I am a C programming learner. I wrote a little program but I get an error message when I try to compile it with gcc compiler.
This is my little program:
printf ("Welcome to the English language quiz!\nPlease answer the next question:\nWhat is the colour of the Lemon?\n1)Red\n2)Orange\n3)Yellow\nPlease type in the number of the right answer and press Enter:");
scanf ("%d, &answer");
if (answer == 3)
printf ("Congratulations! Your answer is right.");
printf ("Sorry. The right answer is 3)Yellow.");
Can somebody explain to me what is wrong?
liviu@liviu-pc ~/Desktop $ gcc welcome\ to\ c\ programming.c
welcome to c programming.c: In function ‘main’:
welcome to c programming.c:8:1: warning: too few arguments for format