I know that if I want to scan an integer-type
variable, I must use the %d. For example, on this program:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdio.h>
#include <stdlib.h>
int main () {
int year, g;
printf ("Enter a year: \n");
scanf("%d", &year);
g=(year+1)%19;
printf ("Year's Golden Number is %d\n", g);
system ("PAUSE");
return 0;
}
But then if a want to scan a floating or char or boolean type variable,
what should I do?