Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INFORMATION Group assignment (a group of 2). Students are required to complete the question based on the instructions given below. Please be informed QUESTION Write

image text in transcribedimage text in transcribed

INFORMATION Group assignment (a group of 2). Students are required to complete the question based on the instructions given below. Please be informed QUESTION Write a menu-driven program that displays the following menu: 1. Great or No? 2. Four Random Number 3. Adding Two Digit's Random Number 4. Adding Numbers Enter a selection: Description for each menu: Choice 3: To split a 2-digit's random number. - The program is to provide ONLY a 2-digit's random number, and then to perform the addition on each digit, eg: if number is 16 , then it should perform the addition of 1+6 if number is 58 , then it should perform the addition of 5+8 Choice 4: To add two 3-digit's random number. - The program is to get a two 3-digits random number, and performing the addition on both numbers. - The program should wait the user to enter for the answer. Any correct answer, will congratulate the user, and any incorrect answer, a message should be printed showing the correct answer. - Eg: INPUT VALIDATION - The program shall ensure the choice value is between 14. Any value is outside the range, will cause the program to repeat. THE RANDOM NUMBERS: Information - For this program, students are requested to understand the used of Random Numbers. - Random number is generated by an algorithm that returns a sequence of apparently non-related numbers each time it is called. - This algorithm uses a seed to generate the series, which should be initialized to some distinctive value using function srand. - To generate a random number, shall import two library: \# include std1ib.h and \#include time. h> - Sample of use: int rand1; srand (time (NULL)); // random number is generated between 1 and 10 rand1 =rand()810+1; cout randl; NOTES a) The program shall include the following (but not limited to): - Comments - Proper indentation and spacing - Suitable / relevant variables name used - Proper (with creativity) screen display of output (to use the formatting output, if needed)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions