1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Finding The Largest Number In A Stucture

  1. Nov 22, 2007 #1
    1. The problem statement, all variables and given/known data
    We are given a structure for a magician. It contains how many different types of tricks they did. We need to write a function that calculates the total number of points they received. So puling a rabbit gets a certain amount of points etc. If they hurt any audience members, they receive zero points.

    Then we write a function that takes an array of Magicians and finds which magician received the most points, using the function we previously created. Then in the body, we initialize an array of 10 Magicians, then call the second function to find the Magician who received the most points, and the we need to print out their data.

    3. The attempt at a solution
    Here is my attempt. What happens is that everytime, it returns the Magician with index zero. Please help!
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted