Advertisement
Ro_ro400_

Untitled

Oct 31st, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     cout << "Hello world!" << endl;
  8.    int a[5];
  9.    int i=0;
  10.    int x=1;
  11.    int c=0;
  12.  
  13.  
  14.  cin >> a[0];
  15.  cin >> a[1];
  16.  cin >> a[2];
  17.  cin >> a[3];
  18.  cin >> a[4];
  19. while (c < 15)
  20. {
  21.  
  22.  while (i < 5)
  23. {
  24.  if (a[i] >= x)
  25.  {
  26.   cout << "*" ;
  27.  }
  28. if (a[i] < x)
  29.  {
  30.   cout << " " ;
  31.  }
  32.    i++;
  33. }
  34. cout << endl;
  35. i=0;
  36. c=c+1;
  37. x=x+1;
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement