C Program to Print Combination of 123




C Program to Print Combination of 123, print 123 in different formats in C matrix of 123 in C .



int main(int argc, char *argv[])
{
int i,j,k;
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{
for(k=1;k<=3;k++)
{
if(i==j||j==k||i==k)
{
continue;
}
else
{
printf("\n%d%d%d",i,j,k);
}
}
}

}
system("PAUSE");
return 0;
}


No comments:

Post a Comment