Write a program in java to display the following pattern:
1
3 5
5 7 9
7 9 11 13
Please answer quick......will mark u brainliest.....
I want the PROGRAM not the continuation of the pattern......
Answers
Answered by
1
Answer:
public class Pattern {
public static void main(String[] args) {
int rows = 4, number = 1;
for(int i = 1; i <= rows; i++) {
for(int j = 1; j <= i; j++) {
System.out.print(number + " ");
++number;
}
System.out.println();
}
}
}
*IF THERE IS ANY ERROR AGAIN ASK QUESTION TO ME....*
BUT PLZZ DON'T REPORT OK...
MARK AS A BRAINLIEST...if it is correct....
Similar questions