Page 2 of 2 First 12
  • Jump to page:
    #16
  1. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,724
    Rep Power
    348
    Number of A's = 7.0
    That doesn't look like an int value. An int would be 7

    The test score inputs have been declared as doubles.
    Then a score of 78.4 or 88.5 is possible?
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    44
    Rep Power
    2
    You're right, I'm stupid. They are doubles...is that a problem?

    Decimal test grades are possible, but I would have to re-do my inequalities because any 89.xx, 79.xx is problematic. I'm not going to deal with that for this assignment...the assignment gave no indication that I would have to deal with decimals.

    edit - I need them to be doubles for my percentages...that is why I made them doubles. With integer division I will get 0's.
  4. #18
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    44
    Rep Power
    2
    e - nm, fixed, I'm dumb. Everything's good.

    Thank you very much Norm. That initializing the min and max was a HUGE help.
  6. #19
  7. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,724
    Rep Power
    348
    Another technique when searching for min/max of data in an array is to set the min and max to the first element in the array and start the loop at the second element of the array.
  8. #20
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    44
    Rep Power
    2
    I haven't learned what an array is yet...hopefully soon.
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo