Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- long long a,b,sa=0,sb=0,p,c=0;
- for (int i=0;i<5;i++){
- cin>>a>>b;
- if (a<(b/2)) c++;
- sa+=a;
- sb+=b;
- }
- p=(sa*100)/sb;
- if (c>=1) cout <<"Fail";
- else if (p>=85) cout <<"Excellence";
- else if (p>=75) cout <<"Very Good";
- else if (p>=65) cout <<"Good";
- else if (p>=55) cout <<"Fair";
- else if (p>=50) cout <<"Weak";
- else if (p<50) cout <<"Fail";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement