Pattern 19

Pattern 19
  • C Code
  • C++ Code
  • Java Code
  • Get these codes on your Android Device

C Code


5 5 5 5 5
  4 4 4 4
    3 3 3
      2 2
        1  
#include<stdio.h> #include<conio.h> void main() { int z=5; int n=5; // size int i,j,k; clrscr(); for(i=n;i>=1;i--){ for(j=n;j>i;j--) { printf(" "); } for(k=1;k<=z;k++) { printf("%d",i); } z--; printf("\n"); } getch(); }

C++ Code


5 5 5 5 5
  4 4 4 4
    3 3 3
      2 2
        1  
#include<iostream.h> #include<conio.h> void main() { int z=5; int n=5; clrscr(); for(int i=n;i>=1;i--){ for(int j=5;j>i;j--) { cout<<" "; } for(int k=1;k<=z;k++) { cout<<j; } z--; cout<<endl; } getch(); }

Java Code


5 5 5 5 5
  4 4 4 4
    3 3 3
      2 2
        1  
class Pattern_19 { public static void main(String args[]) { int n=5; //size int z=5; for(int i=n;i>=1;i--) { for(int j=5;j>i;j--) { System.out.print(" "); } for(int k=1;k<=z;k++) { System.out.print(i); } z--; System.out.println(); } } //end of main } //end of class

Android Apps


Get pattern printing codes on your Android Device :

# C Pattern Programs Free App
# C++ Pattern Programs Free App
# Java Pattern Programs Free App


Get Them Now !!!

Download Code           More Patterns !!!