#include<stdio.h>
void main()
{
int n,i,j;
printf("Enter a number");
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=1;j<=i;j++)
printf("%d",j);
printf("\n");
}
}
OUTPUT:
Enter a number 5
12345
1234
123
12
1
import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...
No comments:
Post a Comment