Advertisement
Ro_ro400_

Untitled

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