Professional Documents
Culture Documents
4.3 Examples
#include <iostream>
using namespace std;
int main()
{
float marks, total, percent = 0;
cout << "Enter the marks obtained in Project Fundaments: ";
cin >> marks;
cout << "Enter the total marks of the subject: ";
cin >> total;
percent = (marks * 100) / total;
if (percent >= 50)
{
cout << "Congratulations on successfully passing this subject. \n";
}
else
{
cout<<" Sorry you did not pass this course, Better luck next time. \n";
}
return 0;
}