/* io.c Some scanf examples */ #include int main () { int i1=-1; float f1; double d1; printf("Please enter an integer: "); scanf("%i", &i1); printf("You typed: %i\n", i1); printf("Please enter a float: "); scanf("%f", &f1); printf("You typed: %f\n", f1); printf("Please enter a double: "); scanf("%lf", &d1); printf("You typed: %f\n", d1); return 0; }