Computer Science, asked by jayeetadassarma, 2 months ago

Nested Loop
A
AA
AAA

Answers

Answered by architjain2007
3

Explanation:

A nested loop join is a naive algorithm that joins two sets by using two nested loops. Join operations are important for database management.

1. import java.util.Scanner;

public class Nested{

public static void main(String[]args){

Scanner keyboard = new Scanner(System.in);

int num = keyboard.nextInt();

String n = "";

for (int x = 1; x <= num; x++){

for (int y = 1; y <= num; y++){

n+="A";

System.out.println(x+":"+n);

}

}

}

.

2. import javax.swing.*;

public class stars

{ public static void main (String [] args)

{

for (int i=5; i>0; i--)

{

for (int x=0; x<i;x++)

System.out.print("X");

System.out.println();

}

}

}

hope it help.

plz mark brainiest and follow

Similar questions