#include "stdafx.h"
#include<stdio.h>int main(){ char a,b,c,d,e; a=getchar(); b=getchar(); c=getchar(); d=getchar(); e=getchar(); putchar(a); putchar(b); putchar(c); putchar(d); putchar(e); putchar('\n'); return 0;}
#include "stdafx.h"
#include<stdio.h>int main(){ int year,leap; printf("input the year:"); scanf("%d",&year); if(year%4==0) { if(year%100==0) { if(year%400==0) leap=1; else leap=0; } else leap=1; } else leap=0; if(leap) printf("year:%d,month:2,days:29",year); else printf("year:%d,month:2,days:28",year); return 0;}
#include "stdafx.h"
#include<stdio.h>#include<math.h>int main(){ int a,b,c,t; scanf("%d,%d,%d",&a,&b,&c); if (a>b){ t=a; a=b; b=t; } if(a>c){ t=a; a=c; c=t; } if(b>c){ t=b; b=c; c=t; } if(a+b<=c){printf("不能构三角形");} else{ if(a==b){if(b==c){printf("等边三角形");} if(a*a+b*b==c*c){printf("等腰直角三角形");} else {printf("等腰三角形");return 0;};} if(b==c){printf("等腰三角形");} if(a*a+b*b==c*c){printf("直角三角形");} else {printf("一般三角形");} } return 0;}
#include <stdio.h> void main() { double a,rate,tax,profit; int b; printf("请输入奖金数:"); scanf("%lf",&a); b=a/500; switch(b) { case 0:rate=0.00;break; case 1:rate=0.05;break; case 2:rate=0.08;break; case 3:rate=0.08;break; case 4:rate=0.10;break; case 5:rate=0.10;break; case 6:rate=0.10;break; case 7:rate=0.10;break; case 8:rate=0.10;break; case 9:rate=0.10;break; default:rate=0.15; }
tax=rate*a; profit=a-tax; printf("税率%.2f\n应缴税款%.2f\n实得奖金%.2f\n",rate,tax,profit); }