can u make a counter for 0-9999 with c ?
After 18 months, do you really think the OP is still sitting there waiting for this?
Only 3 requirements were stated - and you have missed 2 of them:
1. The count value;
2. That language.
You also failed to notice the clear instructions for posting source code:
www.danlhenry.com/.../keil_code.png
And what happens after getch() returns...?
#include <iostream.h> #include <conio.h> main() { int counter; for(counter =0; counter <= 999; counter = counter + 1) {cout << counter <<"\n";}
getch(); }
Just a case of improper use of language. Everyone knows that "are" is a one-letter word...
U are funny engineer!
I do not know 'U' or is it 'micro' if he is that funny, share some of his jokes
Erik
for a new subject start a new thread
Thanx Malund Erik U are funny engineer! U said u use SILABS in your projects how do u interface CRYSTAL to your hardware? do u use serial or usb port or I/O card compatible with it? Do u have any manual of it for a beginner person like me! Things that I always like to learn is interfacing my hardware to cores through USB and SERIAL port can u hapl me in this field?
Yes and every forum I've seen them try it in they get warned not to do it again. Text speak isn't English and people who aren't 'cell' phone infatuated find it so irritating they won't reply to them. They get all bent out of shape if they don't get an answer for days (impatience of youth) then repost. Then they get "no double posting. you must use English in your questions LEET and Cell phone speak is not considered English".
Most people who aren't English speaking are easier to understand than people who use such gibberish. I don't understand why they expect an instant answer either.
Stephen
But in line with the code quality we expect in this thread, ramble is
#define ramble return random_boring_dictionary_lookups
So what "code monkey" wrote this, then?
** Parameters Returned: u16 -- the counted value
I'm sure your famous book must note somewhere that misleading and/or incorrect comments can often be worse than no comments at all...
You don't say - this is a central part of a guidance system of some kind :-)
/* **====================================================================== ** My_Counter **====================================================================== ** ** Counts to MAX_COUNT and returns the MAX_COUNT value. ** **---------------------------------------------------------------------- ** ** Parameters Passed: <void> ** Parameters Returned: u16 -- the counted value ** Notes: ** ** 'ramble( )' expands to 9999 words of boredom. ** **---------------------------------------------------------------------- */ u16 My_Counter( void ) { ramble( 9999 ); // lots of comments }
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
wtf? www.linkedin.com/.../b06
whoops ...
#define Z 0 #define N 9999 #define F for #define I int #define B break #define C if I i=Z; F(;;) C(i++>N) B;
:-)
Since we're now giving him the answers, here's the one I was going to suggest:
#define TWO 1 ... int i; i = 0; loop: i = i + TWO; if (i > 9999) goto end; goto loop; end: ...
*pssschhhht* ...he doesn't know that! ;-)
View all questions in Keil forum