首页 > 代码库 > c预言第三次作业
c预言第三次作业
#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>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(){ char score; printf("请输入数字:"); 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; default: printf("输入有误"); break; } return 0;}
#include<stdio.h>int main(){ int F=100; int C; C=(5*(F-32)/9); printf("%d",C); return 0;}
#include<stdio.h>int main(){ int t=3; int g=10; int h; h=0.5*g*t*t; printf("%d",h); return 0;}
#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); return 0;}
#include<stdio.h>#include<math.h>int main(){ int money,year; double rate,interest; printf("输入存款金额: "); scanf("%d",&money); printf("输入存期: "); scanf("%d",&year); printf("输入年利率: "); scanf("%lf",&rate); interest=money*pow(1+rate,year)-money; printf("interest=%f\n",interest); return 0;}
#include <stdio.h>int main(){ int c ; double f; scanf("%d",&c); if(c<=50) {f=0.53*c;} else {f=50*0.53+(c-50)*0.05;} printf("%lf",f); return 0;}
c预言第三次作业
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。