This question requires writing a program to read in the floating-point number 1, integer, character, and floating-point number 2 in order, and then output in the order of character, integer, floating-point number 1, and floating-point number 2.
Input format:
Input the floating-point number 1, integer, character, and floating-point number 2 in a row, separated by a space.
Output format: output
in the order of character, integer, floating-point number 1, floating-point number 2 in one line, and the floating-point number retains 2 digits after the decimal point.
Input sample:
2.12 88 c 4.7
Sample output:
c 88 2.12 4.70
#include <stdio.h>
int main(void)
{
char c;
int d;
double f1,f2;
scanf("%lf%d %c%lf",&f1,&d,&c,&f2);
printf("%c %d %.2f %.2f",c,d,f1,f2);
return 0;
}