Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <windows.h>
  4. #include <cstdio>
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10.  
  11. int main()
  12. {
  13.  
  14.   int n;
  15.   cout<<"Podaj poziom choinki:";
  16.   cin>>n;
  17.   cout<<endl;
  18.  
  19.   for (int i=1;i<n;i++)
  20.   {
  21.       for (int x=1; x<=n-i;x++)
  22.         {
  23.             cout<<" ";
  24.             }
  25.             for (int y=1;y<=2*i-1;y++)
  26.             {
  27.                 cout<<"x";
  28.                 Sleep(0200);
  29.             }
  30. cout<<endl;
  31.       }
  32.  
  33.       cout<<endl;
  34.       return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement