Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cmath>
- #include <math.h>
- using namespace std;
- int n;
- int c = 1;
- int main(int argc, const char * argv[]) {
- cin >> n;
- int b = n;
- for (int i = n ; i >=1 ; i-- ) {
- for(int d = 1 ; d < c ; d++ ) {
- cout << " ";
- }
- for(int j = 1 ; j <= b ; j++ ) {
- cout << "*";
- }
- for(int j = 1 ; j < b ; j++ ) {
- cout << "*";
- }
- c = c + 1;
- b = b - 1;
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement