3选择结构程序设计

#include <stdio.h>

/*
    功能:输入一个大写字符,屏幕输出小写
    时间:2016 11 14
*/
void main()
{
    char c;
    c = getchar();
    if(c>='A'&&c<='Z')//就是编码问题哦 查表吧
    {
        c = c + 32;
        putchar(c);

    }
    
    system("pause");
}
#include <stdio.h>

/*
    功能:输入一个小于9位的数 输出位数
    时间:2016 11 14
*/
//键盘录入一个不多于9位的正数  输出位数
void main()
{
    int a;
    int count = 0;
    printf("please input a number lowed nine
");
    scanf("%d",&a);
    while(a!=0)
    {
        a = a / 10;
        
        count++;
    }
    printf("这个数一共有%d位",count);

    system("pause");
    
}
 1 #include <stdio.h>
 2 #include <math.h>
 3 /*
 4     功能:判断一点是否在点上
 5     时间:2016 11 14
 6 */
 7 
 8 
 9 
10 //判断这个点是否在圆上 在Y 不在N
11 //用差的绝对值
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.0001
17                             //用  法: double fabs(double x);
18 
19     {
20         printf("Y
");
21     }else
22     {
23         printf("N
");
24     }
25     system("pause");
26     
27     
28 
29     
30 }
原文地址:https://www.cnblogs.com/lanjianhappy/p/6067008.html