# ACSL Program Help

Page 1 of 1

## 3 Replies - 2652 Views - Last Post: 14 December 2009 - 05:27 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=144201&amp;s=8fc60a13d605229f0d0810a45453911e&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 jco10

Reputation: 0
• Posts: 1
• Joined: 08-December 09

# ACSL Program Help

Posted 08 December 2009 - 06:20 AM

PROBLEM: In the sport of golf, scoring is based upon what a normal score should be for a particular hole on a course. That normal score called “par” is based upon the length of that hole measured from the tee, the start point, to the green, the end point. For the vast majority of golf courses and for this problem par values will be either 3, 4 or 5. Golf scores can be reported in three ways. The first way is to report cumulative score. That is, the player scored a 68 after playing the standard 18 holes. The second way is to report the cumulative score in relation to par. If par for the course ( the sum of the par values of all the holes) is 72, then the score reported as 68 would be 4 under par. A score of 75 would be 3 over par. A score of 72 is reported as par. The third way is by holes won. A player wins a hole when his score is lower than his opponent’s score.

INPUT: There will be 9 input lines. Each line will contain 3 positive integers. The first integer will give the par value of each of the nine holes. The second integer will give the score for player A on the same nine holes. The third integer will give the score for player B on the those nine holes.

OUTPUT: There will be five outputs. Print the following:

1. The cumulative score for each player with the better score (the smaller number) first.
2. The score in relation to par for the better score.
3. The score in relation to par for the other player.
4. The number of holes won by the player with the better score.
5. The sum of the scores on a the hole that is the highest for all the holes played.
______________________________________________________________
INPUT:
1. 3,2,3
2. 4,5,5
3. 5,6,6
4. 4,3,4
5. 4,3,4
6. 4,4,5
7. 5,5,6
8. 3,3,3
9. 4,4,5

OUTPUT:
1. 35, 41
2. 1 under par
3. 5 over par
4. 6
5. 12

```this is what i need help on. i am a complete begginer at this and would really spreciate some code with explanations to help. :crazy:
```

Is This A Good Question/Topic? 0

## Replies To: ACSL Program Help

### #2 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12278
• Posts: 45,364
• Joined: 27-December 08

## Re: ACSL Program Help

Posted 08 December 2009 - 06:54 AM

I would like my MIT thesis paper for my Ph.D. Please send in return for source code.

[rules][/rules]

This post has been edited by macosxnerd101: 08 December 2009 - 06:54 AM

### #3 10rbacon

Reputation: 0
• Posts: 5
• Joined: 14-December 09

## Re: ACSL Program Help

Posted 14 December 2009 - 04:41 PM

I was hoping that someone could help me with the same problem. This program is due tomorrow for me and my code isn't working. Can anyone help me?

### #4 pbl

• There is nothing you can't do with a JTable

Reputation: 8378
• Posts: 31,956
• Joined: 06-March 08

## Re: ACSL Program Help

Posted 14 December 2009 - 05:27 PM

10rbacon, on 14 Dec, 2009 - 03:41 PM, said:

I was hoping that someone could help me with the same problem. This program is due tomorrow for me and my code isn't working. Can anyone help me?

so show us your code that is not working