Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int k1, k2, k3, k4, k5;
- cin >> k1 >> k2 >> k3 >> k4 >> k5;
- int s;
- cin >> s;
- int kancelarii = 0;
- if(s == 1) {
- kancelarii = 0;
- }
- else if(s == 2) {
- kancelarii = k1;
- }
- else if(s == 3) {
- kancelarii = k1 + k2;
- }
- else if(s == 4) {
- kancelarii = k1 + k2 + k3;
- }
- else {
- kancelarii = k1 + k2 + k3 + k4;
- }
- if(kancelarii < 1) {
- cout << 100 << endl;
- }
- else if(kancelarii >= 1 and kancelarii <= 5) {
- cout << 80 << endl;
- }
- else if(kancelarii >= 6 and kancelarii <= 20) {
- cout << 60 << endl;
- }
- else {
- cout << 50 << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement