Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- int godini = 0;
- for(int i = 1; i <= n; i++) {
- if(i == 1) {
- godini += 15;
- }
- else if(i == 2) {
- godini += 9;
- }
- else if(i >= 3 and i <= 6) {
- godini += 4;
- }
- else {
- godini += 5;
- }
- }
- cout << godini << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement