#include "stdafx.h" #include "stdio.h"
int main(int argc, char* argv[])
{
char a,b,c,d,e;
a=getchar();
b=getchar();
c=getchar();
d=getchar();
e=getchar();
a=putchar(a);
b=putchar(b);
c=putchar(c);
d=putchar(d);
e=putchar(e);
putchar('\n');
return 0;
}
#include "stdafx.h"
#include "stdio.h"
int main(int argc, char* argv[])
{
int year;
printf("input the year:");
scanf("%d",&year);
if(year/4==0){
printf("year.%d,month:2days:29",year); }
else printf("year:%d,moonth:2,days;30",year);
return 0; }
#include <stdio.h>
void main()
{
int a,b,c;
printf("请输入要判断的三角形三边长:\n");
scanf("%d%d%d",&a,&b,&c);
if((a+b)<=c||(a+c)<=b||(b+c)<=a){printf("不能组成三角形\n");}
else{printf("可以组成三角形\n");
if (a==b||b==c||a==c)
{
if(a==b&&b==c){printf("此三角形是等边三角形\n");}
else{printf("此三角形是等腰三角形\n");}
}
if(a*a+b*b==c*c||a*a==b*b+c*c||a*a+c*c==b*b){printf("此三角形是直角三角形\n");}
}}
#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); }