Write a program in small basic to print the series 1,8,27,64,....up to 10 terms.
Answers
Answered by
18
Answer:
Explanation:
1³ = 1
2³ = 8
3³ = 27
4³ = 64 ...... 10³ = 1000
java program to implement this series:
class A
{
public void series ( )
{
for ( int i = 1 ; i > = 10 ; i++ ) // it repeats the same job 10 times
int S = i × i × i ;
system. out . println ( s ) ;
} // end of for loop
} // end of class A
Public class series_class
{
public static void main ( string args [ ] ) // main( ) function declared as static and public //
{
A obj = new A ( ); // creating a object of class A
obj. series( ) ;
}
} // end of main class
Output:
1
8
27
64
125
216
343
512
729
1000
Answered by
0
THIS IS THE ANSWER FOR YOUR QUESTION.
HOPE IT HELPED YOU.
Attachments:
Similar questions
Math,
6 months ago
Math,
6 months ago
Computer Science,
6 months ago
English,
1 year ago
Computer Science,
1 year ago
English,
1 year ago
Social Sciences,
1 year ago