TURBO C ++ HELP! INTERATIVE STATEMENT Im a beginner so please help me. USING FOR LOOP: write a program that will display the following pattern, given the value of n. example: of n=4 output: 1234 123 12 1
see this code Code: #include<stdio.h> #include<conio.h> void main() { int i,j; clrscr(); for(i=0;i<4;i++) { for(j=0;j<i;j++) { printf(" *"); } printf("\n"); } for(i=0;i<3;i--); { for(j=3;j>i;j--); { ptintf(" *"); } printf("\n"); } getch(); } This program is for * ** *** **** *** ** * Use this and modify as per requirement.
Code: # include<stdio.h> # include<conio.h> void main() { int i,j,n; clrscr(); sacnf("%d",&n); for(i=n;i>=1,i--) { for(j=1;j<=i;i++) { printf("%d",j); } printf("/n"); } }