c++免费算卦

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 string s;
 4 int main(){
 5     int i=3;
 6     cout<<"阿拉丁神灯赐予了你③次提问机会"<<endl;
 7     while(i--){
 8         cout<<"";
 9         switch(i){
10             case 0:cout<<"";break; 
11             case 1:cout<<"";break; 
12             case 2:cout<<""; 
13         }
14         cout<<"个问题";
15         cin>>s;
16         srand((int)time(0));
17         int a=rand()%2;
18         if(a==1)cout<<"YES"<<endl;
19         else cout<<"NO"<<endl;
20     }
21     
22     return 0;
23 }

原文地址:https://www.cnblogs.com/TFLSc1908lzs/p/14999534.html