Question

I). Write a program in  c++ with class  that will help an elementary school student learn multiplication. Use the rand function to produce two positive one-digit integers. The program should then prompt the user with a question, such as How much is 6 times 7? The student then inputs the answer. Next, the program checks the student’s answer. If it’s correct, display the message "Very good!" and ask another multiplication question. If the answer is wrong, display the message "No. Please try again." and let the student try the same question repeatedly until the student finally gets it right. A separate function should be used to generate each new question. This function should be called once when the application begins execution and each time the user answers the question correctly.

I). Write a program in c++ with class that will help an elementary school student learn multiplication. Use the rand function
to produce two positive one-digit integers. The program should then prompt the user with a question, such as How much is 6
times 7? The student then inputs the answer. Next, the program checks the student's answer. If it's correct, display the
message "Very good!" and ask another multiplication question. If the answer is wrong, display the message "No. Please try
again." and let the student try the same question repeatedly until the student finally gets it right. A separate function should
be used to generate each new question. This function should be called once when the application begins execution and each
time the user answers the question correctly.
expand button
Transcribed Image Text:I). Write a program in c++ with class that will help an elementary school student learn multiplication. Use the rand function to produce two positive one-digit integers. The program should then prompt the user with a question, such as How much is 6 times 7? The student then inputs the answer. Next, the program checks the student's answer. If it's correct, display the message "Very good!" and ask another multiplication question. If the answer is wrong, display the message "No. Please try again." and let the student try the same question repeatedly until the student finally gets it right. A separate function should be used to generate each new question. This function should be called once when the application begins execution and each time the user answers the question correctly.
Expert Solution

Want to see the full answer?

Check out a sample Q&A here
Blurred answer
Students who’ve seen this question also like:
Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Not helpful? See similar books
Database System Concepts
Database System Concepts
Introduction. 1PE
marketing sidebar icon
Want to see this answer and more?
Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: 14// write a program in C++ that reads ten positive random numbers and finds the largest odd number…

A: C++ code: #include <iostream>#include <cstdlib>using namespace std;//function…

Q: 14 // write a program in C++ that reads ten positive random numbers and finds the largest odd number…

A: Task: is to get 10 numbers from the user and find the largest odd number out of them using…

Q: 14 // write a program in C++ that reads ten positive random numbers and finds the largest odd number…

A: #include<iostream> #include<time.h> using namespace std; int largestOdd(int num[])…

Q: 14// write a program in C++ that reads ten positive random numbers and finds the largest odd number…

A: code #include <iostream>using namespace std;void print_odd_high(int x[]){ int max = 0;…

Q: In C++, please revise/fix the program below according to the instructions and all the criteria. I…

A: I am considering that the given code is complete and free of logical errors.   Please refer the…

Q: In C++ just do the problems in simple, not complicated code. Even if a problem does not directly…

A: Program Screenshot: Output Screenshot: Program: #include <iostream> using namespace…

Q: Write a program in c++ that asks the user to input two numbers. If the first number entered is…

A: CODE:- #include <iostream>using namespace std;void check(int n1, int n2);int main(){    int…

Q: Write a C++ program that performs the following (see the Appendix for useful functions): (a) Prompt…

A: ∑ indicates summation notation ∏ indicates product notation pow() is use in C++ to compute any…

Q: Write a C++ program that play the Card Guesssing Game. Your program must give the user the following…

A: The, code has given below:

Q: Q7/ Write a program in C++ that asks the user to enter two numbers and prints the sum, product and…

A: PROGRAM CODE:   #include<iostream>using namespace std; // function declarationdouble…

Q: Q2 /I write a program in C++ language that converts the temperature from F to C using the concept of…

A: In this C++ program to convert temperature from Fahrenheit to Celsius , we will take temperature in…

Q: Q2 /I write a program in C ++ language that converts the temperature from F to C using the concept…

A: // C++ program to convert temperature from fahrenheit to celcius   #include <iostream> using…

Q: Q2 /I write a program in C ++ language that converts the temperature from F to C using the concept…

A: /* * C++ Program to Perform Fahrenheit to Celsius Conversion */ #include <iostream> using…

Q: Write a function: int calculate(int x); In c++, the function returns value of 2*x + 3.

A: Write a function: int calculate(int x); the function returns the value 2*x + 3.

Q: Q2 /I write a program in C++ language that converts the temperature from F to C using the concept of…

A: Start Read Temperature in Fahrenheit Calculate C=5*(F-32)/9 Print C Stop

Q: Write a C function which takes two positive integers n and k from the user. Then represent the…

A: Program: #include <stdio.h> //fucntion nSystemint nSystem(int n, int k){ //switch n which is…

Q: Write a program in C++ that asks the user to enter two numbers and prints the sum, product and…

A: C++ code: #include<iostream>using namespace std; // function declarationdouble…

Q: Q2 /I write a program in C++ language that converts the temperature from F to C using the concept of…

A: #include<iostream>using namespace std;int main(){ float C,F; cout<<"Enter the…

Q: Write a function: int calculate(int x); In c++, the function returns value of 2*x^2 + 3*x.

A: Write a function: int calculate(int x); The function returns value of 2*x2  + 3*x.

Q: 15. Write a complete C program, WITH ERROR CHECKING, functions and files, that reads a function…

A: Program description: Generates and prints 'count' random numbers in the range [lower, upper]. Input…

Q: 15. Write a complete C program, WITH ERROR CHECKING, functions and files, that reads a function…

A: #include <stdio.h>#include <stdlib.h>#include <time.h> void GeneratesRandoms(int…

Q: Write a function: int calculate(int x); In c++, the function returns value of 3*x^3 + 3*x^2- 2.

A: #include<iostream>#include<math.h>using namespace std;int calculate(int x){ int z;…

Q: Write a function: int calculate(int x); In c++, the function returns value of 3*x^3 + 3*x^2- 2.

A: Write a function: int calculate(int x); The function returns value of 3*x3 + 3*x2 - 2.

Q: Q3: Write a C++ program, using function, which reads an integer value (T) representing time in…

A: Code is below for the given problem:

Q: Q3: Write a C++ program, using function, which reads an integer value (T) representing time in…

A: Algorithm: 1. Start 2. Read seconds 3. First do integer division of 60 with the seconds read i.e…

Q: Q3: Write a C++ program, using function, which reads an integer value (T) representing time in…

A: Code is below for the given problem: #include <iostream> // including header filesusing…

Q: 5. In the following C code, what is the value of x after the main function exits? void main (void) {…

A: As per our guidelines, only the 1st question is answerable. Please repost the other questions in…

Q: 4. Write a C++ program to implement the Number Guessing Game. In this game the computer chooses a…

A: Write a C++ program to implement the Number Guessing Game. In this game the computer chooses a…

Q: Write a program in C++ with total change amount as an integer input that outputs the change using…

A: A C++ program for the given criteria is as follows, File name: “main.cpp” #include <iostream>…

Q: 1. Bibi is challenging you to implement a recursive function to check integer X is a prime number or…

A: #include <stdio.h>#include<stdlib.h> //Function to find prime or notint isPrime(int…

Q: 3. Write a C program that compute the perimeter of Circle, Rectangle, Triangle and Square. The…

A: Introduction of the Program: The C program takes the choice from the user as C to compute the…

Q: Write C program (NOT C++) which takes as input a positive integer n and decides whether or not n is…

A: So according to the question, we need to write a code which will return whether a number entered by…

Q: Write a program in c++ that enters two statements from the keyboard as follows: The first phrase: is…

A: Sample output

Q: Write a simple C++ code as I am a beginner. The picture of the question is given below.  Create…

A: C++ code for the given problem:-   Note that the left shift and right shift do not work on the…

Q: Assume that there is no data-type float or double in the C implementation on your computer. You…

A: Algorithm: Start Read 2 numbers as strings Using strcmp function, find the greatest number Display…

Q: First: Write a program in C++ by using function overloading that multiply: Two integer numbers Two…

A: Function Overloading: Multiple functions  have the same  name but different parameters are called…

Q: Write a C function called print_type that receives two values (a and b) and print their type…

A: if (a > 0 && b > 0){ printf("Type 1\n");}else if (a < 0 && b > 0){…

Q: In c++, write a unit conversion program that asks which unit to convert from and which unit to…

A: #include<bits/stdc++.h>using namespace std;int main() {   float mag;    cout<<"Enter the…

Q: 2- Write a C++ function that accept one input argument only. The input could be a string, int, float…

A: Question 2. Write a C++ function that accept one input argument only. The input could be a string,…

Q: Use c++  Write a program whose inputs are three integers, and whose outputs are the largest of the…

A: C++ Code for smallest and largest among three numbers: #include <iostream> using namespace…

Q: Write a program that works with fractions. Your program should be able to add,subtract, multiply,…

A: PROGRAMMING APPROACH: Define the necessary header file using namespace. Define the function…

Q: 4. Write a C function that takes two integers as arguments and returns the value of the larger one.

A: Q4.  Algorithm Start Var a, b, c Accept integer value from user in a and b c=functionFindMax(a, b)…

Q: Q3) a) Write a function to simulate coin tossing, the function will use rand function that gives an…

A: #include <stdio.h>#include <stdlib.h> int randomnu()   //part a.{   return rand() % 2;…

Q: 13. Write a function slope (xl, yl, x2, y2) that returns the slope of the line through the points…

A: Algorithm: Start Define 2 methods, slope() and intercept which takes x1,y1,x2,y2 as arguments…

Q: 2. Write a C++ program to play a guessing game: • The computer randomly generates a number between 1…

A: #include <iostream> using namespace std; int main(){    //declare variables    int i,n,num;…

Q: Write a program in C++ that has the following: 1.Calculate average Grade from 5 scores. 2.Use…

A: C++ used to answer this question

Q: Write a program in C++ to compute the total and average of six numbers( by using friend class &…

A: c++ program by using a friend class is as given below : #include<iostream> using…

Q: Q #2: Write a program in C to check a given number is even or odd.Using the function with arguments…

A: C CODE:- #include <stdio.h>#include <stdbool.h>bool checkNumber(int num); int main(){…

Q: Q #2: Write a program in C to check a given number is even or odd.Using the function with no…

A: C CODE:- #include <stdio.h>#include <stdbool.h>bool checkNumber(int num); int main(){…

Q: 1. Which end? Write a simple C program that can determine whether a machine is little- or…

A: Write a simple C program that can determine whether a machine is little-or big-endianWrite a…

Knowledge Booster
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
  • Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
  • C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education
  • Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education