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.

Recommended Answers

All 6 Replies

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

See This

See This

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

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.