The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #10 (permalink)  
Old 07-02-2009
dsptl dsptl is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 9
Quote:
Originally Posted by vidyadhar85 View Post
your logic is again wrong what if average is comes out as 75.
it will be true in last three if statements..
and that 0 is coming because you used %d in printf to print grade use %s
ok thanks i just had to change d to s

but still the last part average, how do i take average of test 1, test 2, and test 3?

I know how to do individual's average but dont know how to do average from a column like test 1 grades....