Can someone help me solving this it is for my project
Attachments:
Answers
Answered by
1
Answer:
import java.util.Scanner;
class pattern
{
public static void main()
{
Scanner sc = new Scanner (System.in); System.out.println("1. Pattern 1 \n 2. pattern
2");
System.out.println ("Enter choice"); int c = sc.nextInt ();
switch (c)
{
case 1:
int a, b, c = 1;
{
X
for (a = 1; a< = 5; a++)
for (b= 1; b <= a; b++)
{
System.out.print (c); C++;
}
System.out.println ();
}
break:
Similar questions