#includeint main(){ int x=90; int y;//车速 printf("超速的车速:"); scanf("%d",&y); if(y>1.1*x && y<1.5*x) { printf("处罚200元"); } if(y>1.5*x) { printf("吊销执照"); }
#includeint main()//出租车计价{ int s,time,rmb; printf("请输入行驶总里程:"); scanf("%lf",&x); printf("请输入等待时间:"); scanf("%lf",&y); if (time%5==0) { if(s<=0) rmb=(time/5)*2; else if (s<=3) rmb=10+(time/5)*2; else if(s<=10) rmb=10+(s-3)*2+(time/5)*2; else rmb=10+(10-3)*2+(s-10)*3+(time/5)*2; } else { if (s<=0) rmb=(time/5+1)*2; else if (s<=3) rmb=10+(time/5+1)*2; else if(s<=10) rmb=10+(s-3)*2+(time/5+1)*2; else rmb=10+(10-3)*2+(s-10)*3+(time/5+1)*2; } printf("乘客应付%d元\n",rmb); return 0;}
#includeint main (){ int a,b,c,t; printf("输入3个数:"); scanf("%d %d %d",&a,&b,&c); if(a
#includeint main(){ int score,n,i; int a,b,c,d,e; a=b=c=d=e=0; printf("请输入学生个数:\n"); scanf("%d",&n); for(i=1;i<=n;i++) { printf("请输入第%d个学生成绩:\n",i); scanf("%d",&score); if(score>=90) a++; else if(score>=80 && score<90) b++; else if(score>=70 && score<80) c++; else if(score>=60 && score<70) d++; else e++; } printf("A:%d人, B:%d人, C:%d人, D:%d人, E:%d人\n",a,b,c,d,e); return 0;
#includeint main(){ int n=10,i,j; for(i=0;i
#includeint main(){ int i,A,B,C,D,E,n,s; A=B=C=D=E=0; printf("Enter n:"); scanf("%d",&n); for(i=0;i