Write a java program to print the following pattern:
13579 3579 579 79 9
Answers
Answered by
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
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