Logo 
Search:

C Programming Article

Submit Article
Comments on Program to receive marks in 2 subjects and output whether the student has passed, failed or is allowed to reappear in any subject
Category: C Programming (Homework Help)    Author: Reiner Fischer

A university has the following rules for a student to qualify for a degree with A as the main subject and B as the subsidiary subject:
- He should get 55% or more in A and 45% or more in B.
- If he gets less than 55% in A he should get 55% or more in B.
However, he should get at least 45% in A.
- If he gets less than 45% in B and 65% or more in A he is allowed to reappear in an examination in B to qualify.
- In all other cases he is declared to have failed.
Write a program to receive marks in A and B and output whether the student has passed, failed or is allowed to reappear in B.


Philo Meena
Philo Meena from IndiaDec 08
I want to write a program on the following basis. Can someone help me?

1. Enter the number of courses taken.
2. Enter the total mark obtained in each course.
3. Then the program should print each time the letter grade of corresponding entered mark by the user exactly after the mark is entered. The grading policy should be according to the table below:
Mark Grade
Mark>=80 A
Mark<80,Mark>=70 B
Mark<70,Mark>=60 C
Mark<60,Mark>=50 D
Mark<50 F

4. Then the program will print the number of each letter grade (i.e. 2A, 4B, 1F).
5. At the end the program will print the average of all the marks entered by the user and will print its corresponding letter grade.


Please enter your Comment
  • Comment should be atleast 15 Characters.
  • Please put code inside [Code] your code [/Code].