#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);
printf("\n");
}
#include<stdio.h>
int main()
{
int year,days;
printf("请输入年份:");
scanf("%d",&year);
if(year%4==0&&year%100!=0||year%400==0&&year!=100)
days=29;
else
days=28;
printf("year:%d month:2 days:%d\n",year,days);
}
#include<stdio.h>
void main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a+b>c&&a+c>b&&b+c>a)
{
if(a==b&&b==c&&a==c)
printf("等边三角形\n");
else if(a==b||b==c||c==a)
printf("等腰三角形\n");
else if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a)
printf("直角三角形\n");
else
printf("一般三角形\n");
}
else
printf("无法构成三角形\n");
}
#include<stdio.h>
int main()
{
double a,rate,tax,profit;
scanf("%lf",&a);
if(a<500)
rate=0;
else if(a>=500&&a<1000)
rate=0.05;
else if(a>=1000&&a<2000)
rate=0.08;
else if(a>=2000&&a<5000)
rate=0.10;
else
rate=0.15;
tax=a*rate;
profit=a-tax;
printf("奖金数=%lf rate=%lf tax=%lf profit=%lf\n",a,rate,tax,profit);
}
#include<stdio.h>
int main()
{
double a,rate,tax,profit;
int k;
scanf("%lf",&a);
k=a/500;
switch(k)
{
case 0:rate=0;break;
case 1:rate=0.05;break;
case 2:rate=0.08;break;
case 3:rate=0.10;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;break;
}
tax=a*rate;
profit=a-tax;
printf("奖金数=%lf rate=%lf tax=%lf profit=%lf\n",a,rate,tax,profit);
}