Advertisement
Beyrin

Lab

Mar 21st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. // lab_1.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. using namespace std;
  6.  
  7. void kek(int amount)
  8. {
  9.     if (amount == 0)
  10.     {
  11.         return;
  12.     }
  13.  
  14.     int value = 0;
  15.     cout << "enter value\n";
  16.     cin >> value;
  17.     kek(--amount);
  18.     cout << value << "\n";
  19.  
  20.    
  21. }
  22.  
  23.  
  24. int main()
  25. {
  26.     int amount = 0;
  27.     cout << "enter amount\n";
  28.     cin >> amount;
  29.     kek(amount);
  30.     system("pause");
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement