Discover a wealth of knowledge at Westonci.ca, where experts provide answers to your most pressing questions. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

JAVA

Write a program to display the first ten terms of the series:
5, 10, 17, --------------​


Sagot :

tonb

Answer:

class Main {  

 public static void main(String args[]) {

   int a = 5;

   int delta = 5;

   for(int i=0; i<10; i++) {

       System.out.printf("%d, ", a);

       a += delta;

       delta += 2;

   }

 }

}