+ 1
I wanted to first increase a no. From 1 to 5 and then decrease it to 1 again using the same loop,but it isn't working.Pleasehelp
#include <stdio.h> void main() { int i,j,k; for(i=1;i<6;i++) { for(j=0;j<6-i;j++) { printf(" "); } j=1; do { printf(" %d",j); if(j<i) {j++; } if(j>i) {j--; } } while(j!=1); printf("\n"); } } I am trying to make 1 121 12321 1234321 123454321
3 odpowiedzi
+ 18
https://code.sololearn.com/c9176coVPDsg/?ref=app
check my one
+ 7
https://code.sololearn.com/cuyQ14jbw5pM/?ref=app
check my code