A class of 35 Students takes an examination in which marks range is from 0 to 10. Write a Program which finds:
a) the average marks
b) the numberof students failed ( marks below 50 )
c) the number of students who scored 100 marks
::: Please if some one can help me in creating this program using a very simple C language its for my class tomorrow.
Try to use ( if else, else if, switch, while, do while......please! remember not too advanced... )
Thanks...
Waiting and in a hurry!!!!
I am Really in Need of this by Today.... ( C Language Program - a simple one )?
First you have to make an array to hold the marks for 35 students, say int student_mark[35].
Then you can use a for loop to read in the marks using scanf. You can also use a for loop to find the average mark.
You could also use a for loop to find b and c with if statements. For example, initializing below_50 and num_scored_100 = 0.
for(int i=0, i%26lt;35, i++)
{
if(student_mark[i] %26lt; 50)
below_50 ++;
else if(student_mark[i] == 100)
num_scored_100 ++;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment