wcnm
#include<bits/stdc++.h>
using namespace std;
string s[101]={"dinosaur","intelligent","talented","artistic","perhaps","notebook","vehicle","prehistoric","completely","original","birth","suffering","artist","death","whole","piece","editor","organize","order","record","die out","a type of","be related to","general education","go back a long way","be similar to","alphabetical order","play an important role"};
string s1[101]={"恐龙","有才智的","有才能的","有艺术天赋的","可能","笔记本","车辆","史前的","完全地","原来的","出生","苦难","艺术家","死","全部的","一首","编辑","安排","顺序","记录","灭绝","一种","与……属于同一种类","通识教育","历史悠久","与……相似","字母顺序","起到重要作用"};
int cnt,num=28,sum;
bool flag[101];
int main(){
srand((int)time(0));
while(num--){
cnt=rand()%28;
while(flag[cnt]==true) cnt=rand()%28;
flag[cnt]=true;
string ss;
cout<<s1[cnt]<<'\n';
getline(cin,ss);
if(ss==s[cnt]){
cout<<"答对了!\n";
sum++;
}else{
cout<<"答错了!正确的应该是:"<<s[cnt]<<'\n';
}
cnt++;
}
printf("正确率:%.2lf%%",sum/28.00*100);
}
学贵信,信在诚。诚则信矣,信则诚矣。
谬论从门缝钻进,真理立于门前。
雄鸡不鸣则已,一鸣惊人;雄鹰不飞则已,一飞冲天。
“千里之行,始于足下。” —— 老子
在寻求真理的长河中,唯有学习,不断地学习,勤奋地学习,有创造性地学习,才能越重山跨峻岭。——华罗庚
知识之树常青,学习便是那不息之泉,滋养心灵,茁壮成长。
学习,如逆水行舟,不进则退,唯有持之以恒,方能抵达智慧的彼岸。
知识之树常青,唯不断学习,方能品尝其甘甜果实。
立志用功如种树然,方其根芽,犹未有干;及其有干,尚未有枝;枝而后叶,叶而后花。------王守仁
水激石则鸣,人激志则宏。——出自秋瑾
骐骥一跃,不能十步;驽马十驾,功在不舍;锲而舍之,朽木不折;锲而不舍,金石可镂。——荀况引自《荀子,劝学》
万事有不平,尔何空自空。长将一寸身,衔木到终古。我愿平东海,身沉志不改。大海无平期,我心无绝时。呜呼!君不见西山衔木众鸟多,鹊来燕去自成窠。 顾炎武 《精卫》\
一个猜数字游戏
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace::std;
int main() {
srand(time(0));
int number = rand() % 101;
int count = 1;
int guess;
cout<<"Please input a number in 0-100:"<<endl;
cin>>guess;
while (number != guess) {
if (guess>number) {
cout<<"猜大了,请重新猜测:"<<endl;
cin>>guess;
} else {
cout<<"猜小了,请重新猜测:"<<endl;
cin>>guess;
}
count ++;
}
cout<<"恭喜你猜对了!"<<"您一共猜了"<<count<<"次"<<endl;
}
```c
#include<bits/stdc++.h>
using namespace std;
string s[101]={"guide","east","west","mix","western","style","popular","site","across","adult","senior","customer","design","else","suggestion","tip","historic","list","landscape","memory","general","sight","natural","almost","become","gateway","influence","artwork","painting","scene","wife","stone","reflection"};
string ss[101]={"指南","东方","西方","混合","西方的","风格","大众喜爱的","地点","在……对面","成年人","老年人","顾客","设计","其他的","建议","指点","历史上著名的","名单","风景","回忆","将军","看见","自然的","几乎","变成","门户","影响","艺术作品","绘画","场面","妻子","石头","映像"};
int sum,flag[101];
int main(){
srand((int)time(0));
for(int i=0;i<33;i++){
int x=rand()%33;
while(flag[x]==1) x=rand()%33;
flag[x]=1;
cout<<ss[x]<<'\n';
string sss;
cin>>sss;
if(sss==s[x]){
cout<<"恭喜你答对了!\n";
sum++;
}else{
cout<<"恭喜你,答错了!正确答案是:"<<s[x]<<'\n';
}
}
printf("%.2lf%%",sum/33.0*100);
}