Question: Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for the answer to 10 random arithmetic problems consisting

Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for the answer to 10 random 0 only Pick two random integers from assign to num1 and num2 and pick a random integer 0 and 1 for the the operation OP If OP s 0 it is addition, 1is of addition and subtraction using integers from 1 to 1 subtraction If it is a subtraction you must make sure that the first number Num1 is bigger than the second number Num2 if it is not then swap the numbers by calling a function Swap that you will define. Each correct problem is awarded 10 points Display the total score at the end of the problems Sample run What is 10+5-27 Incorrect 10+5-15 What is 9.4-75 Correctl (etc) Your total score is ? 

Write a CAI (Computer Assisted Instruction) program as discussed in class to ask a student for the answer to 10 random arithmetic problems consisting of addition and subtraction using integers from 1 to 10 only Pick two random integers from 1 to 10 and assign to num1 and num2 and pick a random integer 0 and 1 for the the operation OP If OP is 0 it is addition, 1 is subtraction If it is a subtraction you must make sure that the first number Num1 is bigger than the second number Num2 Ifit is not then swap the numbers by calling a function Swap that you will define. Each corect problem is awarded 10 points Display the total score at the end of the problems Sample run What is 10+5-?7 Incorrect 10+5=15 What is 9.4=?5 Correcti (etc) Your total score is ?

Step by Step Solution

3.34 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is the completed code for this problem Comments are included go through it learn how th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!