Computer Science, asked by managerhimanshu025, 3 months ago

Write a program (Java) to print the following pattern -
3 6 9 12 15
3 6 9 12
3 6 9
3 6
3

Answers

Answered by usjadhav2001
0

Answer:

follow me

make as brainliest ans

likes my All ans

ok

Explanation:

import java.util.Scanner;

public class MainClass

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

//Taking rows value from the user

System.out.println("How many rows you want in this pattern?");

int rows = sc.nextInt();

System.out.println("Here is your pattern....!!!");

for (int i = 3; i <= rows; i++)

{

for (int j = 3; j <= i; j++)

{

System.out.print(j+" ");

}

System.out.println();

}

//Close the resources

sc.close();

}

Answered by DivineKing37
0

Explanation:

hope it helps you!

please mark me as a brainliest

Attachments:
Similar questions