/*格式化输出*/
#include <stdio.h>
int main(void)
{
/*常量*/
printf("输出整型:%d\n", 10);
printf("输出浮点型型:%f\n", 0.1);
printf("输出字符:%c\n", 'a');
printf("输出字符串:%s\n", "菜鸟学C语言");
/*变量*/
int a; //整型
a = 10;
char b = 'a'; //字符
b = 'b';
float c = 0.1234567890F; //浮点型
double d = 0.1234567890; //浮点型
printf("整型变量a=%d\n", a);
printf("字符变量b=%c\n", b);
printf("字符变量c=%f\n", c);
printf("字符变量d=%lf\n", d);
return 0;
}
}