Hello
i want that the user inputs an number, wich will be printed .
If he doesnt input a number but f.e a character, than the while shouldnt run (because it would be 0 ) and the last printf will not work.
For some reason codeblocks is giving me an error message saying
: /home/nantia/Desktop/A7-8960.c||In function main:|/home/nantia/Desktop/A7-8960.c|11|error: stray \342 in program|
/home/nantia/Desktop/A7-8960.c|11|error: stray \200 in program|
/home/nantia/Desktop/A7-8960.c|11|error: stray \234 in program|
/home/nantia/Desktop/A7-8960.c|11|error: expected expression before % token|
/home/nantia/Desktop/A7-8960.c|11|error: stray \342 in program|
/home/nantia/Desktop/A7-8960.c|11|error: stray \200 in program|
/home/nantia/Desktop/A7-8960.c|11|error: stray \235 in program|
||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Code:#include<stdio.h> int main() { int number; printf("please type a number"); while (scanf(%d,&number)==1) { printf("you tiped the number %d",number); } return 0; }