Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int o,t1,t2,t3,t4,a,b,c,poeni,prosek;
- cin>>o;
- cin>>t1>>t2>>t3>>t4;
- if(o==2){
- poeni=60;
- }
- if(o==3){
- poeni=70;
- }
- if(o==4){
- poeni=80;
- }
- if(o==5){
- poeni=90;
- }
- for(int i=0;i<=100;i++){
- prosek=(t1+t2+t3+t4+i)/5;
- if(prosek>=poeni){
- cout<<i<<endl;
- return 0;
- }
- }
- cout<<"GRESHKA"<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement