CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Oct 2002
    Posts
    30

    question about user-defined functions

    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
    Last edited by gurlygurlz; February 22nd, 2003 at 07:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured