You are viewing a single comment's thread. Return to all comments →
int main() {
int n; scanf("%d", &n); for(int lines = 1 - n; lines < n; lines=lines+1) { int mvp = abs(lines) + 1; for(int i = 1 - n; i < n; i=i+1) { if((abs(i) + 1) > mvp) printf("%d ", abs(i) + 1); else printf("%d ", mvp); } printf("\n"); } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Printing Pattern Using Loops
You are viewing a single comment's thread. Return to all comments →
include
include
include
int main() {
}