在设计测验时需要帮助 [英] Need help in designing a quiz

查看:42
本文介绍了在设计测验时需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家只是为学校设计测验并设法编写了

代码的问题和答案,你我必须添加分数并在

结束整体得分有没有人知道该怎么做或我是什么

谈论

解决方案

C ++ Hell写道:

嘿大家只是为学校设计一个测验,并设法编写问题和答案的代码,你必须添加分数并在
结束时得到总分有没有人知道该做什么或我是什么
谈论




这与C ++编程语言有什么关系?


问候,

Ben




" C ++ Hell" < JC ********* @ hotmail.com>在消息中写道

news:11 ********************** @ t31g2000cwb.googlegr oups.com ...

嘿大家只是为学校设计一个测验,并设法编写问题和答案的代码,你必须添加分数,并且在结束时整体得分有没有人知道什么我要做什么或者我在谈论什么




我要出去讨论你正在谈论一个程序

你写的是(用C ++编写的)你做的是什么?如果是这样,那么

究竟是什么问题?你有什么写的,所以

远,它在做什么(或没做)那会给你带来麻烦?你知道,我们不会只为你编写你的代码。 :-)


-Howard



对不起家伙是的,它在Visual Basic中的C ++ programmin ,不要指望你

为我写它只是想知道我可以去哪个方向,#include

< iostream>

using namespace std;

void main(){

cout<< FUN RUN QUIZ \ n;

cout<< " \ n" ;;

cout<< " Instructions \ n";

cout<< 1)这个游戏由6个问题组成,每个问题有三个可能的

答案\ n;

cout<< 2)在每个问题中,您只能通过输入答案的数量并按下

输入\ n" ;; <来选择

可能的三个答案。 br />
cout<< 3)在每个问题之后,你将获得正确的答案,

天气你是对还是错,你的分数一旦你开心

用这个按下输入\ n" ;;

cout<< 4)重复插入1-3直到你完成所有问题\ n;

cout<< 5)你的总分将在测验结束时显示

\ n" ;;

int result;

cout< ;< " \ n";

cout<< 问题1 \ n;

cout<< 英格兰的资本是什么? \ n" ;;

cout<< 1)Birminham 2)伦敦3)曼彻斯特\ n" ;;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 错误答案(正确答案是伦敦) << endl;

}

else if(result == 2){

cout<< 正确答案 << endl;

}

else if(result == 3){

cout<< 错误答案(正确答案是伦敦) << endl;

}

cout<< " \ n";

cout<< 问题2 \ n;

cout<< 谁写了哈利波特的书? \ n" ;;

cout<< 1)J K罗琳2)T K罗琳3)H K罗琳\ n;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 正确答案 << endl;

}

else if(result == 2){

cout<< 错误答案(正确答案是J K罗琳) << endl;

}

else if(result == 3){

cout<< 错误答案(正确答案是J K罗琳) << endl;

}

cout<< " \ n";

cout<< 问题3 \ n;

cout<< 哪位演员出演电影中的蓝星? \ n" ;;

cout<< 1)Paul Walker 2)Tome Cruise 3)Will Smith \ n" ;;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 正确答案 << endl;

}

else if(result == 2){

cout<< 错误答案(正确答案是保罗沃克) << endl;

}

else if(result == 3){

cout<< 错误答案(正确答案是保罗沃克) << endl;

}

cout<< " \ n";

cout<< 问题4 \ n;

cout<< DvD代表什么? \ n" ;;

cout<< 1)数字虚拟驱动器2)驱动视频磁盘3)数字视频

磁盘\ n" ;;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 错误的答案(正确答案是数字视频磁盘) <<

endl;

}

else if(result == 2){

cout< ;< 错误的答案(正确答案是数字视频磁盘) <<

endl;

}

else if(result == 3){

cout< ;< 正确答案 << endl;

}

cout<< " \ n";

cout<< 问题5 \ n;

cout<< 吉百利在哪一年开始生产巧克力?

\ n;

cout<< 1)1824 2)1830 3)1832 \ n;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 正确答案 << endl;

}

else if(result == 2){

cout<< 错误答案(正确答案是1824年) << endl;

}

else if(result == 3){

cout<< 错误答案(正确答案是1824年) << endl;

}

cout<< " \ n";

cout<< 问题6 \ n;

cout<< 在哪一年,莫扎特写了他的前三首交响曲? \ n" ;;

cout<< 1)1761 2)1764 3)1765 \\\
;

cout<< " \ n";

cout<< 输入你的答案\ n;

cin>>结果;

if(result == 1){

cout<< 错误答案(正确答案是1764) << endl;

}

else if(result == 2){

cout<< 正确答案 << endl;

}

else if(result == 3){

cout<< 错误答案(正确答案是1764) <<结束;

}

}


这就是我得到的,感谢羚牛一看

Hey everyone just designing a quiz for school and managed to write the
code for the questions and answers thou i have to add scores and at the
end an overall score does anyone have any idea what to do or what i am
talkin about

解决方案

C++ Hell wrote:

Hey everyone just designing a quiz for school and managed to write the
code for the questions and answers thou i have to add scores and at the
end an overall score does anyone have any idea what to do or what i am
talkin about



What does that have to do with the C++ programming language?

Regards,
Ben



"C++ Hell" <jc*********@hotmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...

Hey everyone just designing a quiz for school and managed to write the
code for the questions and answers thou i have to add scores and at the
end an overall score does anyone have any idea what to do or what i am
talkin about



I''m going to go out on a limb and assme that you''re talking about a program
you''re writing (in C++) that does what you''re describing? If so, then
what''s the problem you''re having, exactly? What have you got written so
far, and what''s it doing (or not doing) that''s giving you problems? We''re
not going to just write your code for you, you know. :-)

-Howard



Sorry guys yea its in C++ programmin in visual basic, dont expect you
to write it for me just wonderin in which direction i can go, #include
<iostream>
using namespace std;
void main () {
cout << "FUN RUN QUIZ \n";
cout << " \n";
cout << "Instructions \n";
cout << "1)This game consists of 6 questions with three possible
answers to each question \n";
cout << "2)In each question you must only choose one answer out of the
possibley three by enterin the number of the answer and pressing
enter\n";
cout << "3)After each question you will be given the correct answer,
weather you were right or wrong and your score once you are happy
with this press enter \n";
cout << "4)Repeat instrustions 1-3 till you finish all questions \n";
cout << "5)Your overall score will be displayed at the end of the quiz
\n";
int result;
cout << "\n";
cout << "Question 1 \n";
cout << "What is the captial of england? \n";
cout << "1)Birminham 2)London 3)Manchester \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Wrong Answer (The correct answer was London)" << endl;
}
else if (result == 2) {
cout << "Correct Answer" << endl;
}
else if (result == 3) {
cout << "Wrong Answer (The correct answer was London)" << endl;
}
cout << "\n";
cout << "Question 2 \n";
cout << "Who wrote the Harry Potter books? \n";
cout << "1)J K Rowling 2)T K Rowling 3)H K Rowling \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Correct Answer" << endl;
}
else if (result == 2) {
cout << "Wrong Answer (The correct answer was J K Rowling)" << endl;
}
else if (result == 3) {
cout << "Wrong Answer (The correct answer was J K Rowling)" << endl;
}
cout << "\n";
cout << "Question 3 \n";
cout << "Which actor stars in the film Into the Blue? \n";
cout << "1)Paul Walker 2)Tome Cruise 3)Will Smith \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Correct Answer" << endl;
}
else if (result == 2) {
cout << "Wrong Answer (The correct answer was Paul Walker)" << endl;
}
else if (result == 3) {
cout << "Wrong Answer (The correct answer was Paul Walker)" << endl;
}
cout << "\n";
cout << "Question 4 \n";
cout << "What does DvD stand for? \n";
cout << "1)Digital Virtual Drive 2)Drive Video Disk 3)Digital Video
Disk \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Wrong Answer (The correct answer was Digital Video Disk)" <<
endl;
}
else if (result == 2) {
cout << "Wrong Answer (The correct answer was Digital Video Disk)" <<
endl;
}
else if (result == 3) {
cout << "Correct Answer" << endl;
}
cout << "\n";
cout << "Question 5 \n";
cout << "In what year did Cadbury''s first start producing chocolate?
\n";
cout << "1)1824 2)1830 3)1832 \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Correct Answer" << endl;
}
else if (result == 2) {
cout << "Wrong Answer (The correct answer was 1824)" << endl;
}
else if (result == 3) {
cout << "Wrong Answer (The correct answer was 1824)" << endl;
}
cout << "\n";
cout << "Question 6 \n";
cout << "In what year sis mozart write his first three Symphonies? \n";
cout << "1)1761 2)1764 3)1765 \n";
cout << "\n";
cout << "Enter your answer \n";
cin >> result;
if (result == 1) {
cout<< "Wrong Answer (The correct answer was 1764)" << endl;
}
else if (result == 2) {
cout << "Correct Answer" << endl;
}
else if (result == 3) {
cout << "Wrong Answer (The correct answer was 1764)" << endl;
}
}

This is what i got, thanks for takin a look


这篇关于在设计测验时需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆