I'm in trouble because I can't write exercises 1-5.I haven't started yet, so please let me know🙏
I'm in trouble because I can't put the number I entered in the execution result
#include<stdio.h>
int main()
{
int no;
printf("Enter an integer.\n");
scanf("%d", & no);
printf(" plus 12 equals %d.\n",12+no);
return 0;
}
printf(" plus 12 equals %d.\n",12+no);
printf("%d plus 12 equals %d.\n", no, 12+no);
I think it will be solved if
For more information, see how to use printf and how to format it.
I don't know what the book is, but it's basic, so I think there will be an explanation somewhere in the book.
You should have compiled it to run it, but did you get any messages when you compiled it?
If the program in the questionnaire is entered with full-width symbols such as {
, }
, "
, and the actual source code remains full-width, an error occurs during compilation.
After compiling these symbols in half-width, there was no problem running the generated program (a.out
).
© 2024 OneMinuteCode. All rights reserved.