Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 0 points - comment statements to document each program 1 0 points - use of descriptive variable names in each program ( beangame )
points comment statements to document each program
points use of descriptive variable names in each program
beangame Create a program to estimate the number of jelly beans in a jar. Assume the jar is a cylinder. You may also assume the jellybeans are cylinders that measure cm long by cm diameter or cm radius VolumeOfCylinder height radius
radius can be represented as powradius or radius radius
Use the pow function since this is about modulesfunctions Use
#include
in your program. It is the library that has the pow power function.
points correct include libraries
points correct use of pow function
pick Create a pick lottery helper program to select a set of lottery numbers for the user. The program should randomly pick three singledigit numbers from to and display them on the screen. Duplicate numbers are allowed. It should also calculate and display the "sum it up value by adding the three numbers together.
Use number randmax min min; with as the min and as the max for this problem. The following example code picks and displays a number from to
#include
#include
#include
int main
int number;
srandtime;
randomize the number generation
number rand;
cout "The computer picked number number;
return ;
points correct use of rand function
points correct output
guess Write a program that accepts a number as a guess between an as input and outputs if the guess is "too high", "too low", or "correct". When the guess is correct the program should output how many guesses it took.
points correct use of loop statement
points correct use of if statements
points correct #include statements
points correct outputs
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started