urgent help !

This is a discussion on urgent help ! within the C Programming forums, part of the General Programming Boards category; I'm writing a program that's supposed to do this : 1. takes the number of the students in a class. ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    3

    urgent help !

    I'm writing a program that's supposed to do this :
    1. takes the number of the students in a class. ( wich is not known)
    2.takes their grades.
    3.gives the maximum,the minimum and the average grade of the class.

    here's my code : me.c (
    me.c
    NOT meee.c )

    i'm having problems with the last part. I wanted to make an array of the grades and put the maximum in the last cell and the minimum in the first one,
    and then printf the last and the first cell. wich should be the max and the min .
    but I kinda don't know how ?
    can anyone help ???
    or be so kind to suggest another solution ?
    ( only I must use the malloc )
    Attached Files Attached Files
    • File Type: c meee.c (900 Bytes, 25 views)
    Last edited by Ehsan Sharif; 11-24-2012 at 01:26 PM.

  2. #2
    Registered User
    Join Date
    Oct 2012
    Posts
    32
    you declare the variables as float but you read integer value(%d) try to change it

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    3
    thanks : )
    its working now.
    just one thing though.
    when its asking for the grades , it should be writnig : #1 , #2 , #3 , etc.
    but now keeps writing #0.000 for all of them. why is that ?

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    3
    fixed dat .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need urgent help
    By luke luvevou in forum C Programming
    Replies: 14
    Last Post: 06-10-2009, 07:18 PM
  2. HELP!! Urgent !!
    By huwan in forum C++ Programming
    Replies: 21
    Last Post: 06-15-2007, 10:04 AM
  3. urgent
    By nightingale in forum C Programming
    Replies: 8
    Last Post: 07-19-2003, 10:29 AM
  4. need some (urgent) help
    By the Wookie in forum Tech Board
    Replies: 3
    Last Post: 06-27-2003, 07:51 AM
  5. Urgent!!!!!!please Help Me!
    By duffy in forum C Programming
    Replies: 2
    Last Post: 09-06-2002, 02:13 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21