+1(316)4441378

+44-141-628-6690

Archive for the ‘C++’ Category

Gymnastics Competition

Gymnastics Competition

A Gymnastics competition uses one of two methods for calculating the gymnasts score. The competition utilized either three judges or five judges. Write a program to ask which scoring method is utilized and how many competitors are in the competition. Then input the scores from the judges, and calculate the average score for a contestant. Use the following algorithm as a guide.

Algorithm

Display a welcome message to the user.



Display a menu to the user with options for three judges, five judges or quit. If a user enters an option that is not on the menu, display a user-friendly error message and allow the user to try again. Use a string constant for the error message.

If the competition utilizes three judges, ask how many gymnasts are in the competition. Validate that the number is between 1 and 20. For each gymnast, ask the user to input the contestants name and the three scores. A score must be between 0 and 10 and fra

C programming

Additional explanation:
This project will involve you creating a software floating point system for the MLKY programming language.

Follow the directions in P1_Documentation.pdf.  The starting code is provided for you in project1_handout.tar; this code will compile on Zeus and the supporting program will only run on Zeus.  This will untar to provide a Handout directory.

Your project will involve modifying only fp_functs.c to provide an implementation for the four listed functions.  You may create additional functions as needed.  You will only get credit for the addition and multiplication functions if you use the addition and multiplication techniques covered in class.

There is a rubric associated with this project on Blackboard that will let you see what areas are examined for the first 20 points (Code and Comments).  Additionally, 80 points will be assigned based on unit testing of your code by the GTAs.

You will only submit fp

Programming HW 2

Write a program that does the following in order:

Displays a welcome message to the user, and then asks them for the following information in order:
Homework grades for homeworks 1-7, recitation grades for recitations 1-6, test 1, test 2, and final exam. (See sample runs). This will feel a little tedious with a lot of cout, cin, cout, cin, but it's necessary here, for now.
Then, ask the user if they earned any extra credit. They should enter y for yes, or n for no. Allow BOTH UPPERCASE and LOWERCASE Y/y or N/n here. If the user enters an invalid character, the program should end. If the user enters a valid character and it's y for yes, ask them for how many extra credit points they've earned and add it to their overall homework points. If no, don't prompt user for ex. credit points and no extra credit is added to the overall homework points.
The following formulas should help with your calculations:

Homework Average = ((Add All Hws, recitations, and ex credit))/8