We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Printing Pattern Using Loops
Printing Pattern Using Loops
Sort by
recency
|
981 Discussions
|
Please Login in order to post a comment
lost few braincells while doing it, here is cpp #include using namespace std;
int main(){
}
include
include
include
include
int main() {
{ if(i==1) {
}
include
include
include
include
int main() { int k,n,i,j; scanf("%d",&n); k=2*n-1; for(i=1;i<=k;i++) { for(j=1;j<=k;j++) { int hor=abs(n-j); int ver=abs(n-i); int max=hor>=ver?hor:ver; printf("%d ",max+1); } printf("\n"); } } }
include
include
include
include
int main() {
}