随机数
小吴WZK
编程小白
展开
-
猜单词游戏
#include <bits/stdc++.h>using namespace std;int main(){ int a=rand()%10; string b[11]={"tiger","lion","sweater","class","clock","boy","girl","cat","dog","pen"},d; cout<<"Please quess a word:"; while(cin>>d) { .原创 2021-12-26 21:08:56 · 2779 阅读 · 1 评论 -
猜字母游戏
#include<bits/stdc++.h>using namespace std;int main(){ srand(time(0)); char a=rand()%26+'A',b; cout<<"Please quess a letter:"; while(cin>>b) { if(a==b) { cout<<"You're right!"<.原创 2021-12-18 17:13:45 · 1531 阅读 · 0 评论 -
猜数游戏,2.0
#include<bits/stdc++.h>using namespace std;int main (){ srand(time(0)); int a=rand()%100+1,b; cout<<"Please quess a number."<<endl; while(cin>>b) { if(a==b) { cout<<"You're r.原创 2021-12-15 19:05:15 · 2940 阅读 · 2 评论 -
猜数游戏,1.0
#include<bits/stdc++.h>using namespace std;int main (){ srand(time(0)); int a=rand()%10+1,b; cout<<"Please quess a number."<<endl; while(cin>>b) { if(a==b) cout<<"You're right!"<&.原创 2021-12-05 13:00:15 · 1730 阅读 · 0 评论