• 实验二作业


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

    }

     

  • 相关阅读:
    射极跟随器的设计及参数确定
    三极管放大电路 之共射放大电路参数确定
    allegro生成光绘文件时,通过cam打开,*.drl钻孔文件不识别,为Unknow类型
    allegro 16.6 空心焊盘的制作
    cadence16.6 如何对齐元件
    Allegro中板子边框不封闭导致的z-copy无法用的问题
    Android Thermal-engine
    《万历十五年》--黄仁宇
    USB 接口探测分类
    Android电池电量跳变
  • 原文地址:https://www.cnblogs.com/p201821440031/p/10761995.html
Copyright © 2020-2023  润新知