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