akishtp
akishtp

Reputation: 3

I get all the lines inside the printf line in the end of the output

the code: the code

the output: 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

Answers (0)

Related Questions