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

  Calculates the student * averages and quiz averages based

Calculates the student * averages and quiz averages based upon input from the user. Modify this program to read in the following grade text file, * with a maximum number of students set to 35 and having five quiz scores for each student. The output s..

  Write a switch-case programming for calculation

How to use C++ to write a switch-case programming for calculation? Test the program for a wide range of possible inputs including division by zero and square root of negative values.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Randominrange() function that accepts two integer

Write a randomInRange() function that accepts two integer parameters. The parameters will represent the low number and the high number (both inclusive) in the random range. For example, when the function receives 3 and 8.

  Write a program to calculate a person''s net pay

Write a program to calculate a person's net pay after subtracting federal income tax.The program should ask the user to enter the person's name, social security number, gross pay, and the number of dependents.

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  Multiple heaps

Create an application that has two heaps. Place a linked list into each heap. Select one hundred random numbers. Place each of the random numbers into each heap - CSI 345 - Spring 2014 S2

  Program that compares the number of possible sequences

Write a c++ program that compares the number of possible sequences of the length L that can be generated. The program must output a formatted list comparing the number of possible sequences for L=5,6,7,8,9. given size N=9

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Write function that finds the minimum of three double value

1. Write a function that finds the minimum of three double values. This function should use another function that finds the minimum of two double values.

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  Determine order in which constructors of class will execute

Suppose that an object of class three enters its scope, so the constructors of theses classes will execute. Determine the order in which the constructors of these classes will execute.

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