Home > Back-end >  C language basic topics
C language basic topics

Time:10-05

The source code is as follows, where there is an error?

CodePudding user response:

The scanf & amp; A. & amp; b

CodePudding user response:

Line 5, the scanf (" % d % d ", a, b); In front of the ab with less & amp; , & amp; A, & amp; b

CodePudding user response:

The relative standard code
The include & lt; Stdio. H>

Int main ()
{
Int a, b;
Int sum;
The scanf (" % d % d ", a, b);
Sum=a + b;
Printf (" sum is % d ", sum);
return 0;
}

CodePudding user response:

Should be the scanf (" % d % d ", & amp; A, & amp; b);

CodePudding user response:

The scanf (" % d % d ", a, b);
A, b two variables without & amp; symbol
  • Related