Computer Science, asked by sanafatima1d, 4 months ago

Write a java program to print the following pattern:
9 79 579 3579 13579​

Answers

Answered by mohammadadnan7
25

Answer:

class Pattern

{

public static void main (String args [])

{

int i,j;

for(i=9;i>=1;i=i-2)

{

for(j=9;j>=i;j=j-2)

{

System.out.print(j);

}

System.out.println();

}

}

}

please give me thanks if my answer is right and mark me brainly

Answered by udayagrawal49
11

Answer: The required java pragram is :-

public class Main {

public static void main(String[] args) {

    for (int i=9 ; i>=1 ; i-=2) {

        for (int j=i ; j<=9 ; j+=2) {

            System.out.print(j);

        }

        System.out.print(" ");

    }

   }

}

Please mark it as Brainliest.

Similar questions