SHARE
TWEET

Untitled

a guest Dec 13th, 2018 67 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 a=0;
  8.     int b=0;
  9.     int c;
  10.     cin >>c;
  11.     while (a<=c)
  12.     {
  13.         while (b<=c-a){
  14.         cout << " ";
  15.         b++;
  16.         }
  17.     while (b<a+c)
  18.     {
  19.     cout <<"*";
  20.     b++;
  21.  
  22. cout <<endl;
  23. a++;
  24. b=0;
  25. }
  26. while (b<c){
  27. cout << " ";
  28. b++;
  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