首页 > 代码库 > 160809329 仲兆鹏 3

160809329 仲兆鹏 3

#include<stdio.h>//1.三角形int main(){        printf("*\n");    printf("**\n");    printf("***\n");    printf("****\n");    printf("*****\n");    printf("******\n");    printf("*******\n");    printf("********\n");    printf("*********\n");    printf("**********\n");    }
#include<stdio.h>//2.十行矩形 int main(){    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");    printf("**********\n");}
#include<stdio.h>//3.倒三角形 int main(){    printf("**********\n");    printf("*********\n");    printf("********\n");    printf("*******\n");    printf("******\n");    printf("*****\n");    printf("****\n");    printf("***\n");    printf("**\n");    printf("*\n");}
#include<stdio.h> // 4.五级制成绩 int main(){    char score;    scanf("%c",&score);    switch (score)    {        case A:              printf("90~100");              break;        case B:              printf("80~89");              break;         case C:              printf("70~79");              break;        case D:              printf("60~69");              break;        case E:              printf("0~59");              break;     }   }
#include<stdio.h> //7. 显示个位数字,十位数字和百位数字的值。 #include<math.h> int main(){    int t[10]={0};    int a;    scanf("%d",&a);    int i=0;    while(a!=0)    {        t[i++]=a%10;        a=a/10;    }    int j;    for(j=0;j<=i;j++)         printf("%.0f",(t[j]*pow(10,j)))
#include<stdio.h>//8.分段函数#include<math.h>int main (){    double x;    double y;    scanf("%lf",&x);    if(x>=0)         y=sqrt(x);     else         y=pow(x+1,2)+2*x+1/x;         printf("f(x)=%f",y);         }

 

160809329 仲兆鹏 3