Math, asked by jkkjkj, 11 months ago

Write a program to display the series upto 10 terms:
0,7,26..............................................

Answers

Answered by Anonymous
8

import java.util.*;

public class Series

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

int a,i;

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

{

a=Math.pow(i,3)-1;

System.out.println("Display the series"+a);

}

}

}

Answered by Anonymous
17

import java.util.*;

public class Series

{

public static void main(String args[])

{

int x,y;

//using for loop

for(x=1;x<=10;x++)

{

//using mathematical class of java

a=Math.pow(i,3)-1;

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

}

}

}

Similar questions