Fuunctions and stub

Fuunctions and stub1. Your task is to write a C++ program which performs one of three operations basedon the input values. Once again we will only input integers. All of the inputs willbe non-negative. This program will run in a loop, asking the user for values, makingcomputations, printing results, until the user inputs the sentinel value of -9999.(a) Your program will prompt the user for a non-negative integer.This prompt and input MUST be done with a function.If the user inputs a negative value that is not the sentinel value you willdisplay the prompt again and read another value until either a non-negativevalue is input or the sentinel value is input.This function will have no arguments (void).It will return an integer.Its prototype is exactlyint myPrompt( void );The return value will be either a non-negative integer or the sentinel value.(b) If the user inputs a value from 10 to 50 (inclusive), then you will compute thesum of the numbers between 1 and the input value.This computation MUST be done with a function.This function will take as an argument a single integer.It will return an integer.Its prototype is exactlyint mySum( int );(c) If the user inputs a non-negative value less than 10, then you will compute theproduct of the values between 1 and the number.This computation MUST be done with a function.This function will take as an argument a single integer.It will return an integer.Its prototype is exactlyint myProd( int );Note that if the user enters 0, the result should still be 1.(d) If the user inputs a value greater than 50, then you will compute the remainderof that value divided by 13.This computation MUST be done with a functionThis function will take as an argument a single integerIt will return an integer.Its prototype is exactlyint myMod( int );(e) Once you have made a computation, you will print the result. This print outwill be one of1. The sum from 1 to 13 is 912. The product from 1 to 7 is 50403. The remainder of 68 / 13 is 3This output MUST be all generated by a function.This function will take as arguments two integers. The rst argument willbe used to determine which output line to print. The second argument isactual value that is being printed.It will return void.Its prototype is exactlyvoid myPrint( int, int );(f) All of the function prototypes will be before main().(g) There will be NO global variables. All the information the functions need orsupply will be in their arguments or return values.(h) All of the function denitions will occur after main().Should look likeEnter a non-negative integer (-9999 to end): 8The product from 1 to 8 is 40320Enter a non-negative integer (-9999 to end): 9The product from 1 to 9 is 362880Enter a non-negative integer (-9999 to end): 10The sum from 1 to 10 is 55Enter a non-negative integer (-9999 to end): 11The sum from 1 to 11 is 66Enter a non-negative integer (-9999 to end): 12The sum from 1 to 12 is 78Enter a non-negative integer (-9999 to end): 13The sum from 1 to 13 is 91Enter a non-negative integer (-9999 to end): 50The sum from 1 to 50 is 1275Enter a non-negative integer (-9999 to end): 51The remainder of 51 / 13 is 12Enter a non-negative integer (-9999 to end): 52The remainder of 52 / 13 is 0Enter a non-negative integer (-9999 to end): -9878Enter a non-negative integer (-9999 to end): 0The product from 1 to 0 is 1Enter a non-negative integer (-9999 to end): 1The product from 1 to 1 is 1Enter a non-negative integer (-9999 to end): 2The product from 1 to 2 is 2Enter a non-negative integer (-9999 to end): 3The product from 1 to 3 is 6Enter a non-negative integer (-9999 to end): -9999


Last Completed Projects

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min