Hello, I just started learning C using the guide on this page and I found a little problem I haven't been able to fix by myself.
On some examples used on the guide, the program ask for an input and should give you a printf in return. However, after you enter the input, it will finish the program without giving you time to see the answer. What do I use to make it stop/pause in order to be able to read the answer?
An example of this is:
Code:#include <stdio.h> int main() { int this_is_a_number; printf( "Please enter a number: " ); scanf( "%d", &this_is_a_number ); printf( "You entered %d", this_is_a_number ); getchar(); return 0; }



LinkBack URL
About LinkBacks


