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

    #include<stdio.h>

     int main(){

    char 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(){

    int year;

    printf("input the year:");

    scanf("%d",&year);

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

    printf("year:%d,month:2,days:29",year);

    else

    printf("year:%d,month:2,days:28",year);                                                                                          

    return 0;}

    #include<stdio.h>

    void sanjiaoxing(int a,int b,int c);

    int main(){

    int a,b,c;

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

    sanjiaoxing(a,b,c);

    return 0;

    }

    void sanjiaoxing(int a,int b ,int c){

    if((a+b>c)&&(b+c>a)&&(a+c>b))

    {

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

        printf("直角三角形 ");

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

    {

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

            printf("等边三角形 ");

        else

            printf("等腰三角形 ");

    }

     else   printf("一般三角形 ");

    }

    else

    printf("error!!!!!!!!!!!!!!!!!!!!!!!!! ");

    }

    #include<stdio.h>

    void w(int a){

    double rate,tax,profit;

    if(a<500)

    {rate=0.00;

    tax=a*rate;

    profit=a-a*rate;

    printf("a=%d,rate=%f,tax=%f,profit=%f ",a,rate,tax,profit);

    }

    else if(a>=500&&a<1000)

    {rate=0.05;

    tax=a*rate;

    profit=a-a*rate;

    printf("a=%d,rate=%f,tax=%f,profit=%f ",a,rate,tax,profit);

    }

    else if(a>=1000&&a<2000)

    {rate=0.08;

    tax=a*rate;

    profit=a-a*rate;

    printf("a=%d,rate=%f,tax=%f,profit=% f",a,rate,tax,profit);

    }

    else if(a>=2000&&a<5000)

    {rate=0.10;

    tax=a*rate;

    profit=a-a*rate;

    printf("a=%d,rate=%f,tax=%f,profit=%f ",a,rate,tax,profit);

    }

    else

    {rate=0.15;

    tax=a*rate;

    profit=a-a*rate;

    printf("a=%d,rate=%f,tax=%f,profit=%f ",a,rate,tax,profit);

    }

    }

    int main(){

    int a;

    scanf("%d",&a);

    w(a);

    return 0;

    }

  • 相关阅读:
    使用VB获得系统目录路径
    自动点击页面中的JavaScript链接
    vb 随机数
    进程监控程序 监视进程的创建
    UTF8 Encoding rules
    How to create and apply patch by GIT
    Java Access Bridge Why IsJavaWindow always returns false?
    TomatoUSB 挂载了/jffs/opt之后登录出现$提示符以及VI内存耗尽等各种异常
    MMU解释 MMU启用后,CPU的内存访问请求会被MMU截获
    如何调整Linux内核启动中的驱动初始化顺序
  • 原文地址:https://www.cnblogs.com/p201821440025/p/10750315.html
Copyright © 2011-2022 走看看