WAP USING NESTED LOOP
A
bc
CDE
defg
EFGHI
Answers
Answered by
0
Answer:
import java.util.*;
class ap9
{
public static void main(String args[])
{
int i,j,n,k;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the no of lines");
n=sc.nextInt();
for(i=1;i<=n;i++)
{
k=i;
for(j=1;j<=i;j++,k++)
{
System.out.print((char)(k+64));
}
System.out.println("");
}
}
}
OUTPUT:
YOUR ANSWER
JUST TRY IT OUT AND MARK ME BRAINLIEST PLEASE
Similar questions