gurlygurlz
February 22nd, 2003, 06:34 PM
As an assignment, I have to write a program that records stats to a basketball game for a team and their opponent . I MUST include a function called point_shoot to find the shooting percent (2 pointers made/ 2 pointers attempted) for 2 pointers, 3 pointers, free throws, and overall. The function point_shoot must be called multiple times in the program. My output must have this (example)
Team---------2 pointers----------3 pointers--------Overall---------Freethrows
AHS---------9/11=81.81%----------2/3 =66.67%--------etc.
PHS---------6/15=40.0%----------3/6= 50.0%
I am confused as to how I can call the point_shoot function multiple times and have it store each set of input to be able to output the percentages for AHS 2 pointers, 3 pointers etc. and PHS 2 pointers, 3 pointers, etc.
I am a beginner at C++ and just learned user-defined functions.
Thanks
Team---------2 pointers----------3 pointers--------Overall---------Freethrows
AHS---------9/11=81.81%----------2/3 =66.67%--------etc.
PHS---------6/15=40.0%----------3/6= 50.0%
I am confused as to how I can call the point_shoot function multiple times and have it store each set of input to be able to output the percentages for AHS 2 pointers, 3 pointers etc. and PHS 2 pointers, 3 pointers, etc.
I am a beginner at C++ and just learned user-defined functions.
Thanks