Computer Science, asked by niteenkhadse, 1 year ago

Write a program in small basic to print the series 1,8,27,64,....up to 10 terms.

Answers

Answered by franktheruler
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 shamilas330
0

THIS IS THE ANSWER FOR YOUR QUESTION.

HOPE IT HELPED YOU.

Attachments:
Similar questions