Computer Science, asked by debapratikmandal2468, 8 months ago

print the terms. .5, .55, .555 in BlueJ

Answers

Answered by Anonymous
6

Program in Java to print series 5 55 555 5555 55555 555555​

Output:

5 55 555 5555 55555 555555  

Explanation:

Program in java to print given series:

Program:

public class Pattern //defining class Pattern

{

public static void main(String[] a) //defining main method

{

int x,y; //declaring variable

       for (x = 1; i <= 6; i++)  //loop for rows

       {

           for ( y = 1; j <= i; j++) //loop for columns

           {

               System.out.print("5"); //print value.

           }

               System.out.print(" "); //print space

       }

}

}

Hope it will help ya :)

Similar questions