#include <stdio.h>
int main(){
int 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);
return 0;
}
#include <stdio.h>
int main(){
printf("input the year:");
int a;
scanf("%d",&a);
if((a % 4 ==0 && a % 100!=0 )|| a%400==0){
printf("year:%d,mouth:2,days:29 ",a);
}
else
printf("year:%d,mouth:2,days:28 ",a);
return 0;
}
#include <stdio.h>
#include <math.h>
int main(){
printf("请输入三角形的三条边:");
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a+b<c||b+c<a||a+c<b){
printf("不能组成三角形 ");
}
else if(a==b&&a==c&&b==c){
printf("三角形是等边三角形 ");
}else if(a==b||a==c){
printf("三角形是等腰三角形 ");
}else if(pow(a,2)+pow(b,2)==pow(c,2)||pow(a,2)==pow(b,2)+pow(c,2)||pow(a,2)+pow(c,2)==pow(b,2)){
printf("三角形是直角三角形 ");
}else{
printf("组成一般的三角形 ");
}
return 0;
}
#include <stdio.h>
#include <math.h>
int main(){
double e,a,b,c,d;
printf("请输入奖金数:");
scanf("%lf",&e);
if(e<500){
b=0.00;
c=e*b;
d=e-c;
printf("a=%lf ",e);
printf("rate=%lf ",b);
printf("tax=%lf ",c);
printf("profit=%lf ",d);
}else if(e<1000){
b=0.05;
c=e*b;
d=e-c;
printf("a=%lf ",e);
printf("rate=%lf ",b);
printf("tax=%lf ",c);
printf("profit=%lf ",d);
}else if(e<2000){
b=0.08;
c=e*b;
d=e-c;
printf("a=%lf ",e);
printf("rate=%lf ",b);
printf("tax=%lf ",c);
printf("profit=%lf ",d);
}else if(e<5000){
b=0.10;
c=e*b;
d=e-c;
printf("a=%lf ",e);
printf("rate=%lf ",b);
printf("tax=%lf ",c);
printf("profit=%lf ",d);
}else{
b=0.15;
c=e*b;
d=e-c;
printf("a=%lf ",e);
printf("rate=%lf ",b);
printf("tax=%lf ",c);
printf("profit=%lf ",d);
}
return 0;
}