fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int n;
  7. cin >> n;
  8.  
  9. for ( int i =1;i<=n;i+=1)
  10. {
  11. for(int s=n-1;s>0 ; s--)
  12. {
  13. cout << "";
  14. }
  15. for(int j=1; j <=2*i-1 ;j++)
  16. {
  17. cout << "*";
  18. }
  19.  
  20.  
  21.  
  22. }
  23.  
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
Success #stdin #stdout 0.01s 5288KB
stdin
4
stdout
****************