zoukankan      html  css  js  c++  java
  • 实验二作业

    #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;

    }

     

  • 相关阅读:
    1、Elasticsearch教程-从入门到精通
    3、ik分词器
    2、ElasticSearch的安装
    svn操作
    2020-10
    编写第一个linux驱动
    字符设备驱动
    Linux下/dev和/sys/class的区别
    latex
    Qt
  • 原文地址:https://www.cnblogs.com/p201821440031/p/10761995.html
Copyright © 2011-2022 走看看