首页 > 代码库 > 施润行160809301(作业3)
施润行160809301(作业3)
#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; }
#include<stdio.h>int main(){ int a=100; int b; printf("%d",b=5*(a-32)/9); return 0;}
#include<stdio.h>int main(){ int a=3; int b; printf("%d",b=(10*a*a)/2); return 0; }
#include<stdio.h>int main(){ int a=152; int b; int c; int d; b=a%10; c=(a/10)%10; d=a/100; printf("个位数字的值为%d\n",b); printf("十位数字的值为%d\n",c); printf("百位数字的值为%d\n",d); return 0;}
#include<stdio.h>#include<math.h>int main(){ double x, y; printf("请输入一个值:"); scanf("%lf", &x); if (x>=0) y = pow(x,0.5); else y = pow(x+1,2)+2*x+1/x; printf("对应y的值是:%.2f",y); return 0;}
#include<stdio.h>#include<math.h>int main(){ int y,m; double r,i; printf("请输入存期"); scanf("%d",&y); printf("请输入存款金额"); scanf("%d",&m); printf("请输入年利率"); scanf("%lf",&r); i=m*pow(1+r,y)-m; printf("利息为%f",i); return 0;}
#include<stdio.h>int main(){ double x; double y; scanf("%lf",&x); if(x<=50) y=0.53*x; else y=0.53*50+(x-50)*0.58; printf("f(x)=%f",y); return 0;}
#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"); return 0; }
#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"); return 0; }
#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");}
施润行160809301(作业3)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。