• 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 ",a,rate,tax,profit);

             }

             else if (500<=a<1000)

             {

                      rate=0.05;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(1000<=a<2000)

             {

                      rate=0.08;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(2000<=a<5000)

             {

                      rate=0.10;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(a>=5000)

             {

                      rate=0.15;

                      tax=a*rate;

                      profit=a-tax;

                      printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf ",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 ",a,rate,tax,profit);

             }

             else if (500<=a<1000)

             {

                      rate=0.05;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(1000<=a<2000)

             {

                      rate=0.08;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(2000<=a<5000)

             {

                      rate=0.10;

                      tax=a*rate;

                      profit=a-tax;

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

             }

             else if(a>=5000)

             {

                      rate=0.15;

                      tax=a*rate;

                      profit=a-tax;

                      printf("奖金=%lf 税率值=%lf 应交税款=%lf 实得奖金数=%lf ",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;

    }

  • 相关阅读:
    origin/HEAD -> origin/master 这个分支是干嘛的啊
    使用Spring Boot来加速Java web项目的开发
    分辨真假数据科学家的20个问题及回答
    我的数学建模历程
    计算机科学中最重要的32个算法
    期权交易基本原理——买进看跌期权(Long Put),卖出看跌期权(Short Put)
    期货交易术语
    apecceosummit2016
    opencv 61篇
    server-pc--------------->lspci,lsusb,meminfo等配置信息
  • 原文地址:https://www.cnblogs.com/p201821440020/p/10790020.html
Copyright © 2020-2023  润新知