2

 

#include<stdio.h>

int main()

{

         int year;

         printf("请输入一个年份;");

         scanf("%d",&year);

         if(year%4 == 0||(year%400==0&&year%100!=0))

         {

                  printf("%d年2月有29天/n",year);

         }

         else

                  printf("%d年2月有28天/n",year);

         return 0;

#include<stdio.h>

int main()

{

         int a,b,c;

        

         scanf("%d%d%d",&a,&b,&c);

         if(a+b<=c||a+c<=b||b+c<=a)

         {

                  printf("不能组成三角形");

         }

         else

         {

                  if((a==b)&&(b==c)&&(a==c))

                          printf("等边三角形");

        if(a==b||b==c||a==c)

                          printf("等腰三角形");

                  if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a)

                          printf("直角三角形");

                    else

                          printf("一般三角形");

         }

         return 0;

}

 

#include <stdio.h>

#include <math.h>

int main()

{

         double a , rate ,tax,profit;

         scanf("%lf",&a);

         if(a<500)

         {

                  rate=0;

                  tax=a*0;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if (500<=a<1000)

         {

                  rate=0.05;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(1000<=a<2000)

         {

                  rate=0.08;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(2000<=a<5000)

         {

                  rate=0.10;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(a>=5000)

         {

                  rate=0.15;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         return 0;

#include <stdio.h>

#include <math.h>

int main()

{

         double a , rate ,tax,profit;

         scanf("%lf",&a);

         if(a<500)

         {

                  rate=0;

                  tax=a*0;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if (500<=a<1000)

         {

                  rate=0.05;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(1000<=a<2000)

         {

                  rate=0.08;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(2000<=a<5000)

         {

                  rate=0.10;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         else if(a>=5000)

         {

                  rate=0.15;

                  tax=a*rate;

                  profit=a-tax;

                  printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf\n",a,rate,tax,profit);

         }

         return 0;

#include<stdio.h>

int main()

{

         int a,b,c;

        

         scanf("%d%d%d",&a,&b,&c);

         if(a+b<=c||a+c<=b||b+c<=a)

         {

                  printf("不能组成三角形");

         }

         else

         {

                  if((a==b)&&(b==c)&&(a==c))

                          printf("等边三角形");

        if(a==b||b==c||a==c)

                          printf("等腰三角形");

                  if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a)

                          printf("直角三角形");

                    else

                          printf("一般三角形");

         }

         return 0;

}

 

posted on 2019-04-29 14:05  张立6666  阅读(78)  评论(0编辑  收藏  举报

导航