+ 1

C++... write a program that can be used by pupils to practice multiplication tables.. it should prompt the pupil to :

display -Welcome <FIRST NAME >. <Surname > -enter lower limit and upper limit of the multiplication table -if student types in correct answer at first it should say "GOOD" -IF STUDENT TYPES CIRRECT ANSWER FOR THE SECOND TIME IT SHOULD SAY VERY GOOD.. - IF STUDENTS TYPES CORRECT ANSWER FOR THE THIRD TIME IT DISPLAYS AWESOME #include <iostream> using namespace std ; int main () { int up,ll; char n[30], s[20]; cout <<"Enter your name \n"; cin>>n; cout <<"Enter your surname \n"; cin>>s; cout<<"WELCOME\t "<<n<<" "<<s<<endl; cout << "Enter upper limit :" << endl; cin >> up; cout <<"Enter lower limit "<<endl; cin>>ll; cout << "Multiplication table from " << ll << " to " <<up<< endl; for (int j= ll; j<=up; j++) { for (int i= 1; i <=12; i++) { cout << j << " * " << i << " = " << j * i << endl; } cout<< "----------------" << endl; } return 0 ; }

17th Nov 2021, 6:46 AM
Lucie ❗❤️
Lucie ❗❤️ - avatar
8 Antworten
+ 2
Where is your attempts?
17th Nov 2021, 6:50 AM
A͢J
A͢J - avatar
+ 4
But you're not prompting the student to enter an answer anywhere for any multiplication question.
19th Nov 2021, 4:01 AM
Sonic
Sonic - avatar
+ 3
What answer(s) were expected? I only see prompts for <n>, <s>, <up> and <ll> here. I mean, which of those data was to be verified for being right/wrong? May I suggest you to use std::string rather than char arrays?, it's a C++ code not C code anyways ...
17th Nov 2021, 11:26 AM
Ipang
+ 2
Charles Makumbe What is student types?
17th Nov 2021, 7:10 AM
A͢J
A͢J - avatar
+ 1
where can I put them data correct n wrong
17th Nov 2021, 12:01 PM
Lucie ❗❤️
Lucie ❗❤️ - avatar
+ 1
Lucie ❗❤️ But which type of data we have to check. We have first name, surname, upper limit and lower limit but what student will type to print Good, Very Good and Awesome?
19th Nov 2021, 4:45 AM
A͢J
A͢J - avatar
0
I've put them, but I'm failing to input if statements on the code
17th Nov 2021, 6:53 AM
Lucie ❗❤️
Lucie ❗❤️ - avatar
0
its simply suggestin that if a student types in correct answer it should display "Good"
17th Nov 2021, 7:19 AM
Lucie ❗❤️
Lucie ❗❤️ - avatar