Computer Science, asked by sanafatima1d, 4 months ago

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

Answers

Answered by udayagrawal49
8

Answer: The required java program is :-

public class Main {

public static void main(String[] args) {

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

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

            System.out.print(j);

        }

        System.out.print(" ");

    }

  }

}

Please mark it as Brainliest.

Answered by monikajain5753
0

Answer:

public class Main {

public static void main( )

{

   for (int i=1 ; i<=9 ; i+=2)

{

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

{

        System.out.print(j);  

       }        

       System.out.println(" ");

   }}}

I have not written that (String [] args) because it is not necessary you can try it on your compiler it will compile without it

Marks Me As Brainliest

Similar questions