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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  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.

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