#include/* 功能:输入一个大写字符,屏幕输出小写 时间:2016 11 14*/void main(){ char c; c = getchar(); if(c>='A'&&c<='Z')//就是编码问题哦 查表吧 { c = c + 32; putchar(c); } system("pause");}
#include/* 功能:输入一个小于9位的数 输出位数 时间:2016 11 14*///键盘录入一个不多于9位的正数 输出位数void main(){ int a; int count = 0; printf("please input a number lowed nine\n"); scanf("%d",&a); while(a!=0) { a = a / 10; count++; } printf("这个数一共有%d位",count); system("pause"); }
1 #include2 #include 3 /* 4 功能:判断一点是否在点上 5 时间:2016 11 14 6 */ 7 8 9 10 //判断这个点是否在圆上 在Y 不在N11 //用差的绝对值12 void main()13 {14 float a,b;15 scanf("%f,%f",&a,&b);16 if (fabs(a*a+b*b-1)<1e-3)//返回浮点数的绝对值 精度小于0.000117 //用 法: double fabs(double x);18 19 {20 printf("Y\n");21 }else22 {23 printf("N\n");24 }25 system("pause");26 27 28 29 30 }