C语言作业,Task:Program a quiz game with at least 4 questions.For

问题描述:

C语言作业,
Task:Program a quiz game with at least 4 questions.For each question,provide 4 alternative answers - 3 wrong answers and 1 correct answer.The computer has to check if the player has chosen a correct or a wrong answer.It should give direct feedback to the player and should count the number of correct answers.When the player has answered all questions the computer should show how many answers have been answered correctly and also the percentage of correctly answered questions.
Sample Output:
QUIZ
====
Q1:What is the heigth of the television tower in Berlin?
a:90 m b:368 m c:105m d:404m
Player enters "d".
Sorry,this is not correct!
Q2:How many bits have a byte?
a:8 bits b:1024 bits c:8192 bits d:8000 bits
Player enters "d".
Sorry,this is not correct!
Q3:How many states are in Austria?
a:9 b:45 c:12 d:14
Player enters "a".
Congratulation.This is correct.
Q4:What is the name of the US president.
a:Clinton b:Obama c:Wulff d:Merkel
Player enters "b".
Congratulation.This is correct.
You answered 2 of 4 questions (50%) correctly.
1个回答 分类:综合 2014-09-27

问题解答:

我来补答
任务:计划一个问答游戏,至少4个问题.对于每个问题,提供4 -
3另一种回答错误的答案和1正确答案.计算机必须检查如果玩家选择了一个正确的或错误的答案.它应该给直接反馈到球员,应该数数量的正确的答案.当玩家已回答了所有的问题电脑应该显示多少答案已经回答正确,也正确地回答出问题的百分比.样例输出:测验=
= = = Q1:什么是油管柱下放的电视塔在柏林吗?答:90 b:368 m c:105
d:404媒体播放器进入“d”.对不起,这是不正确的!Q2:有多少位有一个字节?答:8位b:1024位c:8192位d:8000
bitsPlayer进入“d”.对不起,这是不正确的!问题3:在奥地利有多少个州?答:9 b:45 c:12
d:14个球员进入“一”表示祝贺.这是正确的.Q4:什么是美国总统的名字.答:克林顿b:奥巴马c:伍尔夫d:MerkelPlayer进入“b”祝贺.这是正确的.你回答2
4问题(50%)正确.
 
 
展开全文阅读
剩余:2000
上一页:单调性最小值
下一页:溶质质量