Showing posts with label Pattern Printing. Show all posts
Showing posts with label Pattern Printing. Show all posts

Wednesday, June 29, 2022

Pattern Printing

 Pattern Printing

Problem Statement
Given a positive integer N, your task is to print a right angle triangle pattern of consecutive numbers of height N.

static void pattern(int n){
    for(int i=1;i<=n;i++)
   {
    for(int j=1;j<=i;j++)
      System.out.print(j+" ");

    System.out.println("");
        }
 
    }
   

ads vert

Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody

  Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody < table >      < thead >    ...