Question
Write a program that reads a character, an integer, and afloating-point number. It then prints the character, first using a character format specification (%c)and then using an integer specification (%d). After printing the character, it prints the integer andfloating-point numbers on separate lines. Be sure to providecomplete instructions (prompts) for the user. Write a program that reads a character, an integer, and afloating-point number. It then prints the character, first using a character format specification (%c)and then using an integer specification (%d). After printing the character, it prints the integer andfloating-point numbers on separate lines. Be sure to providecomplete instructions (prompts) for the user.
Explanation / Answer
please rate - thanks #include #include int main() {char ch; int n; float f; printf("Enter a character: "); scanf("%c",&ch); printf("Enter an integer: "); scanf("%d",&n); printf("Enter a floating point number: "); scanf("%f",&f); printf("The character is: %c The integer is: %d The floatingpoint number is: %.2f ",ch,n,f); getch(); return 0; }