Welcome to Westonci.ca, where finding answers to your questions is made simple by our community of experts. Experience the convenience of finding accurate answers to your questions from knowledgeable professionals on our platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

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;

   }

 }

}