Results 1 to 6 of 6
10-23-2014, 02:51 PM #1
Okay so I am working on a lab for my microprocessor class, and yes i am aware of the title, but the device i am using is a microcontroller.
So my lab consists of starting with c language and nobody in my class knows c except me, reason being from wii and this site. So I am way ahead in the class. The class is taking 2 weeks to do this lab and i finished it about 40 min ago. Now i am just making it look nice, below you will see a spoiler for screenshot which i made. My question will be below, but here is what i had, and have done.
Here is what my teacher gave me for the lab to edit:
Here are screenshot of the program working on PuTTy.
My question is: What ways are there to put a pause/wait in my program?
I ask ways because if one doesn't work, then i can try another.
10-24-2014, 06:41 PM #2
while ('\n' != getchar ());
printf ("Press enter to continue...");
10-25-2014, 05:44 AM #3
10-27-2014, 11:48 AM #4
There's no point in casting every single printf function to void. There can be reasons for completely disregarding the return value of printf, but I don't see those being used here. It's extraneous work in something so simple.
You could also do the actual math in the printf, rather than create a variable for each one that you aren't using anywhere else.
Last edited by ToxicJew.; 10-27-2014 at 11:51 AM.
10-27-2014, 12:04 PM #5