askarulytarlan

Untitled

Oct 2nd, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int n;
  10. int c = 1;
  11.  
  12. int main(int argc, const char * argv[]) {
  13.  
  14. cin >> n;
  15. int b = n - 1;
  16. for (int i = 1 ; i <= n ; i++ ){
  17. for(int j = 1 ; j <= b ; j++ ){
  18. cout << " ";
  19. }
  20. for(int d = 1 ; d <= c ; d++ ){
  21. cout << "*";
  22. }
  23. c = c + 1;
  24. b = b - 1;
  25. cout << endl;
  26. }
  27. }
Add Comment
Please, Sign In to add comment