IDNStudy.com, ang iyong gabay para sa maaasahan at mabilis na mga sagot. Alamin ang mga maaasahang sagot sa iyong mga tanong mula sa aming malawak na kaalaman sa mga eksperto.
Sagot :
//The code below is written in C++
#include <iostream>
int getChoice(){
int a = 0;
std::cout << "Enter your choice: ";
std::cin >> a;
std::cin.ignore();
return a;
}
int main(){
int choice = 0;
int score = 0;
std::cout << "9 multiplied by 9 is ?\n";
std::cout << "(1) 64\n";
std::cout << "(2) 81\n";
std::cout << "(3) 75\n";
std::cout << "(4) 72\n";
choice = getChoice();
if(choice == 2){
std::cout << "Correct!\n";
++score;
}else{
std::cout << "Incorrect! The answer is 81\n";
}
std::cout << "16 multiplied by 9 is ?\n";
std::cout << "(1) 196\n";
std::cout << "(2) 1054\n";
std::cout << "(3) 169\n";
std::cout << "(4) 144\n";
choice = getChoice();
if(choice == 4){
std::cout << "Correct!\n";
++score;
}else{
std::cout << "Incorrect! The answer is 144\n";
}
std::cout << "17 multiplied by 24 is ?\n";
std::cout << "(1) 408\n";
std::cout << "(2) 2408\n";
std::cout << "(3) 208\n";
std::cout << "(4) 168\n";
choice = getChoice();
if(choice == 1){
std::cout << "Correct!\n";
++score;
}else{
std::cout << "Incorrect! The answer is 408\n";
}
std::cout << "12 multiplied by 7 is ?\n";
std::cout << "(1) 84\n";
std::cout << "(2) 74\n";
std::cout << "(3) 94\n";
std::cout << "(4) 14\n";
choice = getChoice();
if(choice == 1){
std::cout << "Correct!\n";
++score;
}else{
std::cout << "Incorrect! The answer is 84\n";
}
std::cout << "100 multiplied by 0 is ?\n";
std::cout << "(1) 1\n";
std::cout << "(2) 100\n";
std::cout << "(3) 0\n";
std::cout << "(4) Undefined\n";
choice = getChoice();
if(choice == 3){
std::cout << "Correct!\n";
++score;
}else{
std::cout << "Incorrect! The answer is 0\n";
}
std::cout << "Test is done!\nYou're Score: " << score << "/5 : " << (score * 100 / 5) << "%\n";
return 0;
}
Ang iyong aktibong pakikilahok ay mahalaga sa amin. Magpatuloy sa pagtatanong at pagbibigay ng mga sagot. Sama-sama tayong lumikha ng isang masiglang komunidad ng pagkatuto. Para sa mabilis at maasahang mga sagot, bisitahin ang IDNStudy.com. Nandito kami upang tumulong sa iyo.