标签:|| mic 交换 for print span etc png 0.00
#include<stdio.h> int main(){ double a,rate,tax,profit; int i; for(i=0;i<5;i++){ scanf("%lf",&a); if(a<500){ rate=0.00; }else if(a<1000){ rate=0.05; }else if(a<2000){ rate=0.08; }else if(a<5000){ rate=0.10; }else{ rate=0.15; } tax=a*rate; profit=a-tax; printf("a=%.2lf rate=%.2lf tax=%.2lf profit=%.2lf \n",a,rate,tax,profit); } return 0; }
#include<stdio.h> int main(){ int a[4]; int i,j,l; for(i=0;i<5;i++){ scanf("%d %d %d",&a[1],&a[2],&a[3]); for(j=1;j<=2;j++){ for(l=j+1;l<=3;l++){ if(a[l]>a[j]){ a[0]=a[l]; a[l]=a[j]; a[j]=a[0]; } } }//交换abc,使a>b>c printf("%d %d %d",a[1],a[2],a[3]); if(a[1]<(a[2]+a[3])){ printf("是"); if(a[1]==a[2]||a[1]==a[3]||a[2]==a[3]){ if(a[1]==a[2]&&a[1]==a[3]&&a[2]==a[3]){ printf("等边"); }else{ printf("等腰"); } } if((a[1]*a[1])==(a[2]*a[2]+a[3]*a[3])){ printf("直角"); } }else{ printf("不是"); } printf("三角形\n"); } return 0; }
#include<stdio.h> int main(){ int i; for(i=0;i<5;i++){ putchar(getchar()); } printf("\n"); return 0; }
#include <stdio.h> int main() { int year; scanf("%d", &year); printf("input the year\n"); if ((year % 100 != 0 && year % 4 == 0) || year % 400 == 0){ printf("year:%d,month:2,days:29",year); } else{printf("year:%d,month:2,days:28",year);} return 0; }
标签:|| mic 交换 for print span etc png 0.00
原文地址:https://www.cnblogs.com/p201821440022/p/10670971.html