• 王仲超 160809312 会的都敲上了


    # include <stdio.h>
    int main()
    {
        int x,y,z,a,b;
        printf("请输入三个要比较的整数:");
        scanf("%d %d %d",&x,&y,&z);
        if (x>y)
        {
            a=x;
        }
        else
        {
            a=y;
        }
        if (a>z)
        {
            b=a;
        }
        else
        {
            b=z;
        }
        printf("最大的数为:%d",b);
        return 0;
    }
    

      

    #include<stdio.h>
    int main()
    {
        int a,b;
        printf("请输入车速和限速:"); 
        scanf("%d %d",&a,&b);
        double c=(double)(a-b)*100/b;
        if(c<=10)
            printf("未超速");
        else if(c<50 && c>10)
            printf("超速,罚款200元",c);
        else
            printf("严重超速,吊销驾驶证",c);
        return 0;
    }
    

      

    #include <stdio.h>
    int main()//五级制成绩分布 
    {
        int i,A,B,C,D,E,n,s;
        A=B=C=D=E=0;
        printf("Enter n:");
        scanf("%d",&n);
        for(i=0;i<n;++i)
        {
            printf("Enter grade %d:",i+1);
            scanf("%d",&s);
            switch(s/10)
            {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:E++;break;
            case 6:D++;break;
            case 7:C++;break;
            case 8:B++;break;
            case 9:
            case 10:A++;break;
            }
        }
        printf("The number of A(90~100):%d
    ",A);
        printf("The number of B(80~89):%d
    ",B);
        printf("The number of C(70~79):%d
    ",C);
        printf("The number of D(60~69):%d
    ",D);
        printf("The number of E(0~59):%d
    ",E);
        return 0;
    

      

    #include<stdio.h>
    int main()
    {
        int i,j,k;
        for(j=1;j<=10;j++)
        {
            for(k=1;k<j;k++)
                printf(" ");
            for(i=1;i<=11-j;i++)            
                printf("*");
            printf("
    ");    
        }     
        return 0;
    }
    

      

  • 相关阅读:
    1250. Check If It Is a Good Array
    380. Insert Delete GetRandom O(1)
    378. Kth Smallest Element in a Sorted Matrix
    341. Flatten Nested List Iterator
    387. First Unique Character in a String
    454. 4Sum II
    D
    勇敢的妞妞 ( 状压 + 思维)
    P1879 [USACO06NOV]玉米田Corn Fields (状压dp入门)
    G
  • 原文地址:https://www.cnblogs.com/wzcshishuaige12/p/5958602.html
Copyright © 2020-2023  润新知