Advertisement
Josif_tepe

Untitled

Dec 15th, 2023
1,005
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n;
  6.     cin >> n;
  7.    
  8.     int prvo_nivo = n;
  9.     int vtoro_nivo = 2 * prvo_nivo;
  10.     int treto_nivo = 2 * vtoro_nivo;
  11.     int cetvrto_nivo = 2 * treto_nivo;
  12.    
  13.     int sum = prvo_nivo + vtoro_nivo + treto_nivo + cetvrto_nivo;
  14.    
  15.     cout << sum << endl;
  16.     return 0;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement