胡明浩 160809313

#include<stdio.h>
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>
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>
#include<stdio.h>
int main()
{
    

char grade; printf("请输入等级:"); scanf("%c",&grade); switch(grade) { 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; default: printf("输入有误"); break; } return 0; }

 

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>
int main()
{
    double F;
    printf("请输入华氏温度:\n");
    scanf("%lf", &F);
    printf("C = %0.2lf\n", 5*(F-32)/9);
    return 0;
}
#include<stdio.h>
int main()
{
    double height;
    int t=3;
    height=0.5*9.8*t*t;
    printf("height=%.2f\n",height);
}
#include<stdio.h>
int main()
{
   int a,b,c,x;
    x=152;
    a=x%10;
    b=(x/10)%10;
    c=x/100;
   printf("整数152的个位数字是%d,十位数字是%d,百位数字是%d\n",a,b,c);
  
 }
#include<stdio.h>
#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);
}
#include<stdio.h>
#include<math.h>
int maim ()
{
    double m;
    double y;
    double r;
    double i;
    scanf("%lf,%lf,%lf,%lf",m,y,r,i);
    printf("interesr=%f",i=m*(1+r,y)-m);
}
#include<stdio.h>
#include<math.h>
int main ()
 {
     double x;
    double cost;
     printf("输入x的值"); 
    scanf("%lf",&x);
    if (x>0&&x<=50)
    printf("cost=%f",cost=0.53*x);
    else if(x>50)
    printf("cost=%f",cost=50*0.53+(x-50)*0.58);
    else 
    printf("Invalid Valuel");
    
 }

 

posted on 2016-09-29 18:05  计科三班HMH  阅读(160)  评论(1编辑  收藏  举报