Computer Science, asked by itzsupercrusher, 7 months ago

Write a program to find the following series upto n terms:
1, 16, 81...

Answers

Answered by singhamanpratap0249
9

Answer:

import java. util.*;

public class Series

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int n, a,b;

System.out.println("Enter the value of n");

for(a=1; a<=n;a++);

{

b=Math.pow(a,4);

System.out.println("The series is ="+b);

}

}

}

Explanation:

Since, it is a series of the value to the power 4.

Such that,

(1)^4=1

(2)^4=16

(3)^4=81

And so on.

Similar questions