# C programming

posted by .

Please name your submission of this problem as b.1.c (20 pts) and b.2.c (20 pts)
You are the official score keeper for the "C" Bowling Association (CBA). You should write a program
that will:
 a. Input date of game (three integers yyyy/mm/dd).
 b. Input bowler's first and last name initial (two separate characters) and three scores (three
integer of 0-300 ranges).
 c. Calculate average for that bowler. d. Assign stars to that bowler based on the following scale:
o Avg >= 200 4 stars
o Avg 170 to 199 3 stars
o Avg 125 to 169 2 stars
o Avg 100 to 124 1 star
o Avg < 100 no star
 e. Output the bowlers name, avg, and number of stars earned.
 f. Your program must be able to process any number of bowlers.
 g. Discover which bowler had the highest average and print out his/her name, average and
number of stars. (Assume there is only one bowler who had the highest average)
 h. Calculate and output the average of all the bowlers and the date of game.
Implement all functionalities in your main() function and name this file as b.1.c.

Example:
This is the "C" bowling association
Please input the bowler's first and last initial:bo
Please input the bowler's score:101 102 103
Bowler b. o. has average 102 and 1 star(s)
Please input the bowler's first and last initial:mr
Please input the bowler's score:202 204 203
Bowler m. r. has average 203 and 4 star(s)
Please input the bowler's first and last initial:^D
The best bowler on 2012/10/14 is:
Bowler m. r. has average 203 and 4 star(s)
The average of all bowlers in this game is 152

Modify b.1.c to make a file with name b.2.c. In b.2.c, you need to make following changes:
 i. Instead of output the number of stars in e. and g., your program must print the actual
appropriate sequence of stars (like "****"), not just a number.
 j. Step c., d. and e. in previous requirements must be written as separate functions. (e.x. int
average(int, int, int); int assignStar(int); void output(char, char, int, int);)
 k. Your program should be able to process multiple games in different dates. And it should
discover the bowler who had the highest average over these games and print out his/her name,
average and assigned sequence of stars. Your program should also print the date when the best

Example:This is the "C" bowling association
Please input the game date (yyyy/mm/dd):2012/10/13
Please input the bowler's first and last initial:mr
Please input the bowler's score:245 234 248
Bowler m. r. has average 242 and ****
Please input the bowler's first and last initial:bo
Please input the bowler's score:300 299 289
Bowler b. o. has average 296 and ****
Please input the bowler's first and last initial:^D
The best bowler on 2012/10/13 is:
Bowler b. o. has average 296 and ****
The average of all bowlers in this game is 269
Please input the bowler's first and last initial:bo
Please input the bowler's score:101 102 103
Bowler b. o. has average 102 and *
Please input the bowler's first and last initial:mr
Please input the bowler's score:202 204 203
Bowler m. r. has average 203 and ****
Please input the bowler's first and last initial:^D
The best bowler on 2012/10/14 is:
Bowler m. r. has average 203 and ****
The average of all bowlers in this game is 152
The highest score was on 2012/10/13
The best bowler in all game is:
Bowler b. o. has average 296 and ****

Hint and requirement:
 Use scanf("%d/%d/%d", &y, &m, &d); to read yyyy/mm/dd. Use scanf("%*c%c%c", &fi,
&li); to read first and last initials after reading date with scanf(); If there is no other scanf()
used before the one you use to read first/last initials, you can just use the normal
scanf("%c%c", &fi, &li);
 No array is allowed to use in this program.
 Assume input is reasonable and without error.

• C programming -

I'll help you but I'm not gonna right your code for you. What are you lost on?

## Similar Questions

1. ### Computer programming

problem: Write a program that accepts your first name then displays it content in reverse order. Ex: Enter your name: Michael Your name in reverse order: Leahcim can anyone write the code?
2. ### Computer Science

Can anyone please write a basic c++ code for the following instructions?
3. ### C++ Programming

Video Game Player Program Write a program to do the following. In main declare a Player Name Array and a Score Array. Declare the size of the arrays to be 100. In the InputData function input the player name and score into the arrays …

a basketball player scored 8 pts total during 1st and 2nd quarters of a game. During the 3rd quarter she scored 3 times as many pts as she did in the 4th quarter. Let P = the # of pts the player scored in the 4th quarter. Write and …
5. ### programming logic

The program will accept user input to store the student's first and last name . If the name is ZZZ, then the program will end. The program will accept: a text entry for the class number (e.g., CGS 1000, COP 1000, etc.) a numeric value …
6. ### English

Could you please check these sentences, please. Thank you. 1. Connect the sentences with a relative pronoun and make any necessary changes. 2. Write in brackets the relative pronouns that can be omitted. 3. Complete the sentences with …
7. ### Stats

A sample of n-25 students is selected from a population with mu =100 with standard deviation of 20. On average, how much error would be expected between the sample mean and the population mean?
8. ### computer science programming

Elements – sequence-series outputting Write a program that prints the following elements: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, (hereto referred to as elements) etc., up till a user-entered value. The program should not print more than …
9. ### C++programming

Write an interactive C program that will accept each student’s name an exam grades as input, determine an average grade for each student, and then display the student’s name, the individual exam grades and the calculated average. …
10. ### C++

// Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert temperature …

More Similar Questions