+ 1

Pattern printing ,using c

input if 4; 1*2*3*4*3*2*1 5*6*7*6*5 8*9*8 10*

15th Mar 2018, 2:12 AM
Suresh KC
Suresh KC - avatar
5 odpowiedzi
+ 6
This is challenge or?
15th Mar 2018, 2:43 AM
Vukan
Vukan - avatar
0
ya
15th Mar 2018, 2:44 AM
Suresh KC
Suresh KC - avatar
0
void main (){ int i,j,k,z,n,num=0; scanf("%d",&n); for (i=0;i <n;i++){ for (j=i;j <nj++){ num=num+1; printf ("%d*",num); z=num;} for (k=i;k <n-1;k++){ z=z-1; printf ("%d*",z);} printf ("\n"); } }
16th Mar 2018, 3:41 AM
Suresh KC
Suresh KC - avatar
21st Jul 2020, 1:00 AM
shubham kumar
shubham kumar - avatar
0
👌👍
28th Feb 2021, 7:08 AM
Suresh KC
Suresh KC - avatar