import java.util.*;
class pat20
{
public static void main(String[] args)
{
int i,j,k;
Scanner sc=new Scanner(System.in);
System.out.println("Enter Number of lines:");
int n=sc.nextInt();
for( i=5;i>=1;i--)
{
for( j=i;j<=n;j++)
{
System.out.print("*");
}
System.out.println();
}
}
}
No comments:
Post a Comment