Question: How would i modify the example so that it prints both of the variables using an int, a character, and a float conversion specifier? /*
How would i modify the example so that it prints both of the variables using an int, a character, and a float conversion specifier?
/* FILE: scan.c */ /* Illustration of scanf( ). */
#include
int main( ) { int x; float y; printf("x = %d ", x); printf("y = %f ", y); printf("Enter an integer value for x: "); scanf("%d", &x); printf("Enter a floating-point value for y: "); scanf("%f", &y); printf("x = %d ", x); printf("y = %f ", y); return 0; }
// Language is in C.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
