print this pattern using for loop. [FONT="]1 2 3 4[/FONT] [FONT="] 5 6 7[/FONT] [FONT="] 8 9[/FONT] [FONT="] 10[/FONT] [FONT="] 10[/FONT] [FONT="] 9 8[/FONT] [FONT="] 7 6 5[/FONT] [FONT="]4 3 2 1[/FONT]
can you figure out the last step? Code: #include <stdio.h> int main(){ int i; for (i=0;i<20;i++){ if (i<10) printf("%d ",i+1);//straight else printf("%d ",20-i);//reverse } getchar(); return 0; }