Find expert answers and community support for all your questions on IDNLearn.com. Get the information you need from our community of experts who provide accurate and comprehensive answers to all your questions.

JAVA

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


Sagot :

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;

   }

 }

}