enter marks in three subject and display the result accordingly, if student have greater then 50 marks in at least two subjects then the result shows pass otherwise display fail
Answers
Answered by
1
Answer:
djrjrjrjfifidiiaiwfuf
Answered by
0
Program in C++:
#include<iostream>
using namespace std;
int main()
{
int a, b, c;
cout<<"Enter marks in 3 subject (out of 100)\nSubject 1 : ";
cin>>a;
cout<<"Subject 2 : ";
cin>>b;
cout<<"Subject 3 : ";
cin>>c;
if((a > 50 && b > 50) || (a > 50 && b > 50) || (b > 50 && c > 50) || (a > 50 && b > 50 && c > 50))
{
cout<<"Pa.ss";
}
else
{
cout<<"Fail";
}
return 0;
}
Output:
Enter marks in 3 subject (out of 100)
Subject 1 : 67
Subject 2 : 87
Subject 3 : 34
Pa.ss
Similar questions