Home > Back-end >  I C a novice, would you please tell me why you not what I want and output of 300, what's the pr
I C a novice, would you please tell me why you not what I want and output of 300, what's the pr

Time:09-18

CodePudding user response:

int a,b,c;
The scanf...
C=a + b;
.

CodePudding user response:

Original a, b two memory unit value is uncertain (memory units may be used to recycle redistribution), so c is also uncertain, a, b input values, to calculate the value of c,

CodePudding user response:

Define the assignment, but can not be directly join formula

You can even don't have to define variables c

 printf (" and they are "); 
Printf (" % d ", a + b);

CodePudding user response:

Thank you for your attention!

CodePudding user response:

refer to the second floor u010165006 response:
explain in place
Original a, b two memory unit value is uncertain (memory units may be used to recycle redistribution), so c is also uncertain, a, b input value, calculating the value of c,

CodePudding user response:

reference hongss reply: 3/f
definitions can be assigned a value, but not directly join a formula to calculate the

You can even don't have to define variables c

 printf (" and they are "); 
Printf (" % d ", a + b);
positive solutions
  • Related