zoukankan      html  css  js  c++  java
  • 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;

    }

  • 相关阅读:
    幂等性
    视频上墙
    java 字符串 大小写转换 、去掉首末端空格 、根据索引切割字符 、判断是否含有某连续字符串
    Java 递归 常见24道题目 总结
    Java 单引号 与 双引号 区别
    细谈 Java 匿名内部类 【分别 使用 接口 和 抽象类实现】
    细谈 == 和 equals 的具体区别 【包括equals源码分析】
    简单谈谈 数组排序 的方法 【自定义算法 、 冒泡算法 等】
    细说 栈 为什么又被称为 栈堆 ?【得从数组变量讲起】
    简单谈谈 堆、栈、队列 【不要傻傻分不清】
  • 原文地址:https://www.cnblogs.com/p201821440020/p/10790020.html
Copyright © 2011-2022 走看看