daily pastebin goal
67%
SHARE
TWEET

Д/з.№2(e).С++

DimaBishanov Mar 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int var;
  8. cout << "vvedute rasmer elku: ";
  9. cin >> var;
  10. int a=0;
  11. while (a < var){
  12.     int b=0;
  13.     while (b < var - a) {
  14.         cout << " ";
  15.         b++;
  16.     }
  17. b = 0;
  18.     while (b < (a*2) - 1) {
  19.         cout << "*";
  20.         b++;
  21. }
  22. cout << endl;
  23. a++;
  24. }
  25. int c = 0;
  26. while (c<var-1) {
  27.     cout << " ";
  28.     c++;
  29. }
  30. cout << "*";
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top