zoukankan      html  css  js  c++  java
  • 解决方案

    #include<stdio.h>

    #include<Windows.h>

    #include<time.h>

    void main()

     {

     int a, b, c, d,i,m,n;

      float p, q;

     srand(unsigned( time(NULL)));

      for (i = 0; i < 30; i++)

     {

            a = rand() % 100;

            b = rand() % 100;

             c = rand() % 5;

             switch (c)

             {

             case 0: printf("%d + %d = ", a, b);

                 break;

            case 1:if (a < b)

            {

                       d = a;

                       a = b;

                      b = d;

            }

                    printf("%d - %d = ", a, b);

                    break;

           case 2:printf("%d * %d = ", a, b);

                 break;

             case 3:

               while (b == 0)

                 {

                    b = rand() % 100;

                }

                 printf("%d / %d = ", a, b);

                 break;

             case 4:

                a = rand() % 100;

                 b = rand() % 100;

                 m = rand() % 100;

                 n = rand() % 100;

                 c = rand() %4 ;

                 while (b == 0)

                 {

                     b = ran

  • 相关阅读:
    poj3068
    tyvj1864 [Poetize I]守卫者的挑战
    BZOJ1597 [Usaco2008 Mar]土地购买
    [AtCoder Regular Contest 083] Bichrome Tree
    [LUOGU]3919 【模板】可持久化数组
    [LUOGU]P3701 主席树(假的)
    2018.7.20模拟赛
    [CodeForces]1006F Xor Path
    2018.7.19模拟赛
    [LUOGU]P1373 小a和uim之大逃离
  • 原文地址:https://www.cnblogs.com/wushao12345/p/9751661.html
Copyright © 2011-2022 走看看