Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

GC Week 5 Computer Science Number Guessing Game Project

GC Week 5 Computer Science Number Guessing Game Project

GC Week 5 Computer Science Number Guessing Game Project

Description

Programs to upload: p27.cpp, p28.cpp, p29.cpp, p30.cpp, p31.cpp, p32.cpp, p33.cpp

Once each program is working, copy/paste the program test run (output) at the bottom of your code as a multiline comment, as shown in the p1 program! 

Program 27:

Write a number guessing game. The computer will generate a random number between 0 and 100.

The user will be prompted to guess the number.

If the number guessed is greater than the random number, an appropriate message will appear, with a similar message for low guesses.

The user should keep guessing until the correct number is guessed.

An appropriate message should congratulate the user for guessing the correct number.

Sample Run:

(to cheat, show the random number) 78

Please enter a guess b/w 0 – 100: 56

No, it’s higher than that.

Please enter a guess b/w 0 – 100: 85

No, it’s lower than that.

Please enter a guess b/w 0 – 100:78 

Correct, you got it…It took your 3 guesses!

Save and submit it as p27.cpp

Program 28:

Write a program that generates X random integers Num.

Num is a random number between 20 to 50. 

X is a random number between 10 to 15.

Calculate and show the Smallest, Largest, Sum, and Average of those numbers.

HINTs to find Smallest

1) X is a random number between 10 to 15… for example 11

2) Make the first random number Num of 20 to 50 before the loop.

3) Before the loop, Smallest equals Num above 

4) Use a loop to make the rest (X – 1) of the random numbers Num,

5) if the Num generated in the above loop is less than Smallest, then Smallest equals that number

HINTS TO FIND SMALLEST

1) X is a random number between 10 to 15… for example 11

2) Make the first random number Num of 20 to 50 before the loop.

3) Before the loop, Smallest equals Num above

4) Use a loop to make the rest (X – 1) of the random numbers Num,

5) if the Num generated in the above loop is less than Smallest, then Smallest equals that number 

PROGRAM 29:

Write a program to compute a gymnastics competition score.

There are 4 judges who mark the gymnasts in the range of 0 to 10, and the overall score is the average of the marks.

An error message should appear if a mark is entered that is out of the range (0-10) and then ask the user to input a valid mark again.

Output the average.

Format the output nicely, so it is easy to read and to follow. 

PROGRAM 30:

Write a program to let a child practice arithmetic skills.

The program should first ask for what kind of practice is wanted: +, -, * (no division).

Two random numbers will be generated (0 – 9).

If the child answers incorrectly, the problem should be repeated (same numbers used) until they get it right.

If the child answers the question correctly, a message should appear to congratulate them.

At the end of the program, it should ask the child if they want to try again, which will let the user repeat the program as many times as desired. 

PROGRAM 31:

You have the choice of:

1) 1 million $

2) 1 penny which doubles its value during the next 30 days

Which one would you chose?

Write a program to compute and show the value of the penny at day 30, and exactly how much more (or less) that is compared to the 1 million dollars.

Save and submit it as p31.cpp

Program 32:

Write a Dice Game program that would result in output as shown below. 

PROGRAM 33:

Write a program which asks the user to type in the length of three sides of a triangle: a, b, c

1) Let the user know that the shape is a RIGHT TRIANGLE if either one is true:

  • a2 is equal to b2 + c2
  • b2 is equal to a2 + c2
  • c2 is equal to a2 + b2

2) Let the user know that it is an EQUILATERAL TRIANGLE if BOTH of the conditions are true:

    • a is equal to b
    •  b is equal to c

Explanation & Answer:

1 Project
User generated content is uploaded by users for the purposes of learning and should be used following our honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Essay Noon only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Essay Noon are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Essay Noon are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Essay Noon, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20