76 255
Assignments Done
Successfully Done
In May 2019

Answer to Question #20850 in C++ for fuji

Question #20850
Addition, Subtraction and Multiplication
The program can be used as a math tutor for a young student. The program should display two random numbers between 1 and 9. After the student has entered an answer, the program should display the correct answer so the student can see if his/her answer is correct.
Expert's answer
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;

int main()

srand ( time(NULL) );
int i,j;

int m=i*j;

cout<<"please ask the question"<<j<<"*"<<i<<"=?"<<endl;
int k;

if(k!=m) {
& cout<<"foulse"<<endl;
& cout<<j<<"*"<<i<<"="<<m<<endl;}
& else{cout<<"true"<<endl;}
cout<<"i="<<i<<" & j="<<j<<endl;

return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions