WAP to make all the combinations of 3,6,9 taking all three.

#include<stdio.h>
 #include<stdlib.h>

 main()
 {
 int i,j,k,a[3]={3,6,9};
for(i=0;i<=2;i++)
 {
 for(j=0;j<=2;j++)
 {
 for(k=0;k<=2;k++)
 {
 printf("%d%d%d\n",a[i],a[j],a[k]);
 }}}
system("pause");
}
Advertisements

Leave a comment

Filed under TUTORIALS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s