#include <stdio.h>
int main()
{
int a,b;
double x,y;
char c1,c2;
scanf("%d%d%lf%lf",&a,&b,&x,&y);
getchar();
scanf("%c",&c1);
getchar();
scanf("%c",&c2);
printf("%d\n%d\n%.1f\n%.2f\n%c\n%c\n",a,b,x,y,c1,c2);
return 0;
}
#include <stdio.h>
int main()
{
int a,b;
double x,y;
char c1,c2;
scanf("%d%d%lf%lf",&a,&b,&x,&y);
getchar();
scanf("%c",&c1);
getchar();
scanf("%c",&c2);
printf("%d\n%d\n%.1f\n%.2f\n%c\n%c\n",a,b,x,y,c1,c2);
return 0;
}
本文标题:练习2-3-7:scanf、printf测试
本文链接:https://www.haomeiwen.com/subject/ohvwuktx.html
网友评论