0
Please Write a Java program to print the series 2 6 10 14. 3 7 11. 4 8.5
. Is line break
3 Antworten
+ 10
2 6 10 14
3 7 11
4 8
5
Algo
T=2
Loop i from 4 to 1
M=T
Loop j from 1 to i
Print M
M=M+4
j++
T++
i--
+ 15
● Make an array for length n=4 (no. of rows needed) & i=2(beginning element) , for next n-1 (4) elements form A.P. by using n as common difference ( 2, 2+4 , 2+4+4 , 2+4+4+4 )
● now make a loop for k=1 to k=n-1
● inside it run another loop from a=0 to a=k & using it print elements of that array after adding k-1 , ie [arr[a]+(k-1)]
● after inner loop ends, don't forget to add "\n" to get into next line 👍
2 6 10 14. 3 7 11. 4 8. 5
+ 7
Could you please show us what you have done so far?