Reputation: 3
the code:
the output:
I just started learning c. So, I did a simple sum program.
The code looks like this...
Int main(void){
Printf("enter numbers");
Int n1,n2;
Scanf("%d%d",&n1,&n2);
Sum=n1+n2;
Printf("sum= %d",sum);
}
when I build the program, there are no errors or warnings, but the console is empty. I can still type in two numbers and it gives the sum too.
33
66
enter numberssum=99
I want the entered number displayed when I hit run, not after finding the sum.
I use the eclipse ide for c&c++ 2020-06
Upvotes: 0
Views: 49