Computer Science, asked by sashwatibasu, 5 months ago

write a java program to display the first ten terms of the series 1, 4, 9, 16

Answers

Answered by anindyaadhikari13
4

Question:-

➡ Write a Java program to display the first ten terms of the series.

Program:-

This is written in Java.

class Series

{

public static void main(String args[])

{

for(int i=1;i<=10;i++)

System.out.print(i*i+" ");

}

}

Answered by maghaananthi
1

Question:

write a java program to display the first ten terms of the series: 1, 4, 9, 16.

Answer:

logic:

1, 4, 9, 16, 25, 36, 49, 62, 77, 94

class program

{

Public static void main(String args[])

    {

         int x=3;

         int add=x+2;

         for(int i=1; i<=94; i++);

         {

         add=add+i;

         System.out.println(add);

         }

    }

}

Similar questions