Home > database >  Who teach me, please
Who teach me, please

Time:03-09

Excuse me, I'm a little of the new, I took a quite long time no see, where is the wrong ah,
# include
#include
#include

Int main ()
{
Srand (time (0));
Int number=rand () % 100 + 1;
Int sum=0;
Int a=0;

Printf (" please to guess in the 1 to 100 digital \ n ");

Do {
Printf (" please enter a number: \ n ");
The scanf (" % d, & amp; A ");
sum++;
If (a> Number) {
Printf (" you input number is larger, ");
} else if (aPrintf (" you input the number of smaller, "); }

}
while(a!=number);
Printf (" % d times will you use just guessed the digital % d ", sum, a);


return 0;
}

CodePudding user response:

The scanf (" % d, & amp; "A) here is wrong, instead the scanf (" % d", & amp; A) try;
  • Related