set up your own pattern of numbers (minimum 5) and write the pattern language for the same.
Answers
Answered by
1
*
**
***
****
*****
import java.util.*;
class p1
{
void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number of lines");
int l = sc.nextInt();
for(int i = 1 ; i<=l ; i++)
{
for(int j=1 ; j<=i ; j++)
{
System.out.print("*");
}
System.out.println();
}
}
}
Similar questions