Computer Science, asked by rookief880, 1 year ago

Write a program to generate the first n terms in the series --- 2,3,5,7,11,...,17

Answers

Answered by smartyrathore
2

Here is your answer✌️❤️✌️❤️

13

Answered by ronakbhavsar495
2

Answer:

  • Use the Java program to generate the first n terms in the series- 2,3,5,7,11...,17.
  • Type in the following code in the Java screen to generate the output.
  • class number { Static public void main(String[]args) {int add=1; for (int i=0;i<=13;i++) {add=add+i; System out.println(add);}}}
  • Using Java program is easy and quick, and you will be able to create the program in just a matter of minutes.

Similar questions