Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ???
Language: C/C++
Code:
#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
     cout << "创作:代子安 \n使用方法:输入“1”,后回车即可 \n退出请输入“2”";
     int a;
     cin >> a;
     if(a == 2){return 0;}
     for(int i = 0;i <= 1000;i++)
     {
         int num = rand();
         num %= 44;
         cout << num;
         cin >> a;
if(a == 0){
continue;

         if(a == 2){break;}
         else
             {cout << "Error!Please type correct num!Try again!Now next turn.";continue;};
     }
     cout << "确定退出?请按下回车键"
     getchar();
     
    return 0;
}
Comments: