Home / Blue J / java program for pattern with indentation

java program for pattern with indentation

 java program for pattern making


This is a simple java program for pattern with indentation.
Indentation in pattern is thus required. This can be done using extra for loop to provide the required indentation per line.
class format3
public static void main(String arg[])
int i,j,k=1;            //section of code to be implemented in any of Java/ bluej/ c/c++
for(j=5;j>=i;j--)    // for loop to print the spaces/indentation required for every line before the values required
System.out.print(' ');

for(j=i;j>0;j--)    // after spacing , vales are to be printed



Tags: program for pattern making in bluej, java program for pattern making, c program for pattern / formats.

Check Also

C Program to restrict Mouse pointer in a Rectangle

This C Program will restrict the Mouse pointer Position in the Rectangle. The Mouse Programs are listed here ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.