KnowledgeBoat Logo

Java Series Programs

  • Java Iterative Stmts

    Write a program in Java to print the following series:

    3, 6, 12, 24, 48, ….. to n

    View Answer

    39 Likes


  • User Defined Methods

    Design a class to overload a function series( ) as follows:

    (a) void series (int x, int n) – To display the sum of the series given below:

    x1 + x2 + x3 + ………. xn terms

    (b) void series (int p) – To display the following series:

    0, 7, 26, 63 ………. p terms

    (c) void series () – To display the sum of the series given below:

    1/2 + 1/3 + 1/4 + ………. 1/10

    View Answer

    114 Likes


  • User Defined Methods

    Design a class to overload a method series( ) as follows:

    1. double series(double n) with one double argument and returns the sum of the series.
      sum = (1/1) + (1/2) + (1/3) + ………. + (1/n)
    2. double series(double a, double n) with two double arguments and returns the sum of the series.
      sum = (1/a2) + (4/a5) + (7/a8) + (10/a11) + ………. to n terms

    View Answer

    167 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    3, 6, 9, 12,

    View Answer

    63 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    4, 8, 16, 32,

    View Answer

    65 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    1.5, 3.0, 4.5, 6.0,

    View Answer

    63 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    0, 7, 26,

    View Answer

    84 Likes


  • Java Nested for Loops

    Write a program in Java to print the series:

    8, 88, 888, 8888, 88888, 888888

    View Answer

    26 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    1, 9, 25, 49,

    View Answer

    61 Likes


  • Java Iterative Stmts

    Write the program in Java to display the first ten terms of the following series:

    4, 16, 36, 64,

    View Answer

    50 Likes


Showing 11 - 20 of 63 Questions