Number pattern in C.

 

Number pattern in C.

 

Number Pattern: In C language you can print any number pattern. Here, this program teach you how print all combination of 123.

 

 

Let’s open turbo C/C++ and write the following code:

 

 


#include<stdio.h>

#include<conio.h>

void main()

{

int   i,j,k;

clrscr();

for(i=1;i<=3;i++)

{

for(j=1;j<=3;j++)

{

for(k=1;k<=3;k++)

{

printf(“%d%d%d “,i,j,k);

}

printf(“\n”);

}

}

getch();

}


 

 

 

Output:

 

output

 

 

Happy coding.

 

 

Tags: , , ,

Comments are closed.