ann111

3d**

Jun 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. int main()
  2. {
  3.     int d[5];
  4.     int a,b,c,e,z;
  5.     a=b=e=z=0;
  6.     c=5;
  7.     while (a<c)
  8.     {
  9.         cout << "zvezdochek v stolbike: ";
  10.         cin >> d[b];
  11.         a=a+1;
  12.         b=b+1;
  13.     }
  14.     a=b;
  15.     b=0;
  16.     int max=d[b];
  17.     b=b+1;
  18.     while (b<a)
  19.     {
  20.         if (d[b]>max)
  21.         {
  22.             max=d[b];
  23.         }
  24.         b=b+1;
  25.     }
  26.     a=b=0;
  27.     while (a<max)
  28.     {
  29.         while (e<c)
  30.         {
  31.             if (z<d[b])
  32.             {
  33.                 cout << "*";
  34.  
  35.             }
  36.             else
  37.             {
  38.                 cout << " ";
  39.             }
  40.             b=b+1;
  41.             e=e+1;
  42.         }
  43.         z=z+1;
  44.         cout << endl;
  45.         b=e=0;
  46.         a=a+1;
  47.     }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment