Write a program that calculates the average marks of three subjects of a student, entered by the user through keyboard and store them in three different float variables having names marks_subject1, marks_subject2, marks_subject3

The formula to calculate the average is:

average = (marks_subject1 + marks_subject2 + marks_subject3) / 3
Your program should also display the average calculated.
Now on the basis of the calculated average, it should be decided that the student is Excellent, Good or Fail using conditional statements.

1. Excellent if average is greater then or equal to 70.
2. Good if average is less then 70 and greater then or equal to 50.
3. Fail if average is less then 50.

Hint: if-else structure.

12 Years
Discussion Span
Last Post by perniciosus

Why do you even give homework help at all ? isnt that what teacher are for ?

yes i take help for all


what's your doubt?
Mention where you need help?

i am new commer in c++. so that is my problem plz solve me


This problem is taken straight out of a text book and can be solved by any one who has heard of if-then-else constructs in ANY language... Go construct a "never heard of programming logic" forum somewhere...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.