Assignement 3

begin loop Display Selection Prompt Selection If Selection equals End Loop Sky Diving Do Calculation Display Fee Add To Grand Total

Mountain climbing

Note: 1) All Local Variables must be defined at top of the function 2) Comments are mandatory 3) Proper Indentation is mandatory
Do Calculation Display Fee Add to Grand Total Skiing Number of people in group? Must be less than five validate Display Total Fee Add To grand Total

For each person Ask Each person's expertise. If Selection equals

Calc Beg fee Add to total Calc interm fee Add to total Calc Expert fee Add to total

4) Use Meaningful variable names
Quit Display the asteriks using for loop and while loop Display grand total for everyone in all the categories

Invalid Selection

Try again. Go back to the beginning of the loop


1) You must use at least one printf and one scanf function 2) You must use a switch statement for the menu options 3) Comments are mandatory. 4) Proper indentation is mandatory 5) Your program must include all the features, must work and must output correct results 6) You must use the proper type of loop for validation 7) Make sure that all your inputs are validated to be greater than 0 8) Make sure to not clear the screen. Do not add any additional inputs. There should be a pause only at the very end of your program. Make sure the sequence of your inputs is like the prototype

Run demo There is a health club that offers three outdoors program that you can sign up for. 1) Sky diving 2) Mountain climbing 3) Skiing 4) Quit The fee for each one of these activities is different.

For each person in the group ask what their level of expertise is? 1) Beginner 2) Intermediate 3) Expert If the person is a beginner then the fee for that person is $20 multiplied by the number of people in the group If the person is an intermediate then the fee for that person is $30 multiplied by the number of people in the group If the person is an expert then the fee for that person is $40 multiplied by the number of people in the group If the user puts in an invalid entry. Otherwise the fee is $1500 plus 20 percent of the user’s age Display the fee If the user select Mountain climbing Prompt the user for the number of hours he/she works per week? The fee is equal to $5. ( Caution: Pay attention to the order of precedence) (Note: 40 hours and less are regular hours. Anything greater than 40 is overtime) Display the fee If the user selects skiing Prompt for the number of people who are in your group(Must be less than 5)? If the user enters an invalid number prompt the user again.50 multiplied by the number of regular hours plus $6. then prompt again Display the total for the whole ski group If the user selects Quit Display the subtotal for each menu option Display the grand total for all the options added together Also display the following pattern using nested loops ( You must display only one character at a time.If the user selects sky diving Prompt the user for his/her age? If the user is older than 15 then the fee is $1500 minus 15 percent of the user’s age.35 multiplied by the number of overtime hours.) ***** ***** ***** ***** .

Grading rubric for this assignment Total points worth (15) This grading rubric can change based upon the instructor’s discretion Problem Points lost (1st case) If the program is not turned in. . does not compile. or is plagiarized show as -15 No comments -3 Wrong kind of loop -2 for each one Validation issues with loops -2 for each one Validation issues with no loops -4 for each one Wrong results (if formula is almost correct) -2 for each one Pattern 2. does -30 which means that your score will close to nothing. This means that you will get a minimum of at least 5 points unless things go really wrong.5 points deduction Does not run with the script correctly Depends?? (2-5 points) Indentation problems Depends?? (2-5 points) Variable names Depends?? (1-4 points) Other issues Depends ?? There is a maximum deduction of 10 points with the exception of the 1st case.