Once the user enters a 0

Assignment Help C/C++ Programming
Reference no: EM13165457

Because all users may not have 10 scores and we want to keep the scores they entered for use at a later date, the above program will have to be modified to add a menu that lets the user decide how many scores they will enter, and a process to save the scores to a file.

Set up a menu that will ask the user to enter a score, slope and rating, or to enter 0 for the score when they are done. The program will then need to check for a value of 0 entered by the user to exit the input loop. You will need to increment a counter each time the user does not enter 0 so that you know how many entries they have made.

Prior to the loop you previous created to populate the array, add logic to create a new file with the user's name as the file name.

Within the loop you previously created to populate the array, add logic to save each score to the user's file.

Once the user enters a 0 you will exit the loop, close the file and execute the code as previously designed until you have displayed all of the scores and the average handicap.

Extra Credit:
Add logic to the program to search for an existing file with the user's name. If you find the file, welcome the user back and then add the new scores to the existing file. If you don't find a file with the user's name, welcome them to the program and create a new file.

this is the first program that need to be edited

#include "stdafx.h"

#include <iostream

int main()

{

     // Variable Declaration

     int a;

     // Get Input Value

     cout<<" Please enter the Score:";

     cin>>a;

     int counter = 1;

     //Do while Loop Block

     do

     {

         cout<<" Please enter the course Slope "<<counter<<" score"<<endl;

         counter++;

     }score (counter <= a);

     // Wait For Output Screen

     getch();

     return 0;

cout << anArray[h - 1];

while (1) ;           /

//(((Score > 144) "The max score is a double par. I'll give you a 144 for this round."

//(((score 55-155)"This is not an acceptable Slope. Please try again."

//(((score 60-80) "This is not an acceptable Rating. Please try again."

//as per the formulae (((Scores - Ratings) * 113) / Slopes)

Set handicap of a golfer = ((Scores- Ratings * 113) / Slopes)

Display "(Scores-Ratings * 113 / Slopes)*

Display

End Module

Reference no: EM13165457

Questions Cloud

Calculate the amount of energy in kilojoules : Calculate the amount of energy in kilojoules needed to change 117 of water ice at 10 to steam at 125 . The following constants may be useful.
List the changes in your final sensitivity analysis : List the changes in your final sensitivity analysis, and explain why you chose this set of changes and briefly explain what Jordan would need to do to implement each of these changes.
What is the ph of the resulting mixture : In a titration, 0.0 mL of 0.025 M hydrochloric acid is added to 30.0 mL of 0.030 M ammonia. What is the pH of the resulting mixture?
What mass of sucrose should be combined : What mass of sucrose should be combined with 461 g of water to make a solution with an osmotic pressure of 8.85 atm at 310 K? (Assume the density of the solution to be equal to the density of the solvent.)
Once the user enters a 0 : Once the user enters a 0 you will exit the loop, close the file and execute the code as previously designed until you have displayed all of the scores and the average handicap.
Determine the number of whole units : Determine the number of whole units to be accounted for and to be assigned costs and the equivalent units of production for the Drawing Department.
Create a class account that represents a banking account. : Create a class Account that represents a banking account.
Find the number of automobiles : The mass of an average blueberry is 0.72 g and the mass of an automobile is 1900 kg. Find the number of automobiles whose total mass is the same as 1.0 {rm mol} blueberries.
Give the coordinates of the ''outliers'' : The threshold value you gave, and the maximum distance from the centroid to the farthest point in a cluster for all the clusters. It should also give the coordinates of the 'Outliers' in a separate output file. Outliers are those points that do no..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design and write a c++11/fltk game program

The project is to design and write a C++11/FLTK game program with a graphical user interface. The game is based on "pancake sorting," which actually has some mathematical significance.

  Design a deck plan space ship in eclipse

Develop a simple interactive two-dimensional spaceship deck plan editor using OpenGL and GLUT. Your program will enable a user to create and save a deck plan of a hypothetical spaceship comprising the hull walls.

  Monkey business, a local zoo

Monkey Business, a local zoo, wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 7 array, where each row represents a di..

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

  Native method with deadlock detection and recovery

The naïve method with deadlock avoidance and the naïve method with deadlock detection and recovery - what will you measure and compare in order to determine the winner or which is better

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

  Reads in a list of integers

Write a program in C++ that reads in a list of integers into and array with base type int. Provide the facility to either read this array from the keyboard or from a file, at the user's option. If the user chooses file input, the program should reque..

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  C program to compute parking fare for customers

Write C program to compute parking fare for customers who park their cars in parking lot when following information is provided: A character showing type of vehicle: C for car, B for bus and T for truck

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd