打印字符和数字

#include <stdio.h>
//char-字符类型
//int-整型
//short int-短整型
//long-长整型
//long long-更长的整型
//float-单精度浮点型
//double-双精度浮点型
int main()
{
//char ch="A";
//printf("%c\n",ch);//%c-打印字符格式的数据
//int age=20;
//printf("%d\n",age);//%d-打印整型十进制数据
//long num=100;
//printf("%d\n",num);
//float f=5.0;
//printf("%f\n",f);//%f-打印单精度浮点数字
double d=3.14;
printf("%lf\n",d);//%lf-打印双精度浮点数
return 0;
}

posted @ 2021-01-04 18:34  qyscc  阅读(303)  评论(0)    收藏  举报