Program to check student pass with 1st grade or not
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int marks;
cin>>marks;
if(marks>=40){
if(marks>60){
cout<<"Pass with 1st grade"<<endl;
}
else{
cout<<"Pass"<<endl;
}
}
else{
cout<<"Fail"<<endl;
}
return 0;
}
Input
72
Output
Pass with 1st grade
0 Comments