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 main(int argc, const char * argv[]) {
- cin >> n;
- int y = 1;
- int k = 17;
- int c = n - 1;
- int m = n * 3 - 2;
- for (int i = 1 ; i <= n - 1 ; i++ ){
- for(int j = y ; j <= y + c ; j++ ){
- cout << j << " ";
- }
- cout << endl ;
- y = y + c;
- c = c - 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement