-
2 Attachment(s)
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 : Attachment 12270 (
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 )
-
you declare the variables as float but you read integer value(%d) try to change it
-
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 ?
-