Skip to main content

Posts

Showing posts with the label PYRAMID

PYRAMID SHAPE: USING FUNCTION CALLING

PYRAMID SHAPE: USING FUNCTION CALLING ANOTHER FUNCTION AIM:   TO PRINT THE PYRAMIDAL SHAPE USING LOOP CONCEPT AND PRINTING NUMBERS EXAMPLE:                 1              2 3            4 5 6           7 8 9 10 SYNTAX import java.io.*; class pattern2 {     public static void main(String args[])throws IOException     {         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));         System.out.println("Enter No. of lines to print");         int n= Integer.parseInt(br.readLine());         int x=1;         int l=n-1;         for(int i=1;i<=n;i++)         { spaces(l--);             for(int j=1;...