A

Admin • 828.03K Points
Coach

Q. What is printed?
for(int i=1;i<=3;i++){
for(int j=1;j<=i;j++){
System.out.print("*");
}
System.out.println();
}

  • (A) ***
  • (B) * ** ***
  • (C) *** ** *
  • (D) * * *

Explanation by: Admin
This loop prints a right-angled triangle pattern.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.