Computer Science, asked by kamalrajatjoshi94, 4 months ago

Write a program to print a diamond pattern in java?​

Answers

Answered by mrsanjusingh78
0

Answer:

Java Program to Print Diamond Pattern

public class Diamond.

int n, i, j, space = 1;

System. out. print("Enter the number of rows: ");

Scanner s = new Scanner(System.

n = s. nextInt();

space = n - 1;

for (j = 1; j <= n; j++)

for (i = 1; i <= space; i++)

Explanation:

here is your answer if you like my answer please follow

Answered by Anonymous
0

public class Diamond.

int n, i, j, space = 1;

System. out. print("Enter the number of rows: ");

Scanner s = new Scanner(System.

n = s. nextInt();

space = n - 1;

for (j = 1; j <= n; j++)

for (i = 1; i <= space; i++)

hope it helps you

please follow and mark as brainliest

Similar questions