Pattern 4

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

C Code


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

C++ Code


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

Java Code


5 5 5 5 5
4 4 4 4 4
3 3 3 3 3 
2 2 2 2 2
1 1 1 1 1  
class Pattern_4 { public static void main(String args[]) { for(int i=5;i>=1;i--) { for(int j=1;j<=5;j++) { System.out.print(i); } System.out.println(); } } }

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 !!!