Â
In this, we are going to see a program to display all possible combinations of 1,2 and 3 with help of C Programming Language.
#include <stdio.h>
#include <math.h>
int main()
{
int i, j, k;
printf("The all possible combinations for 1,2 and 3 are: \n");
for (i = 1; i <= 3; i++)
{
for (j = 1; j <= 3; j++)
{
for (k = 1; k <= 3; k++)
{
printf("%d%d%d\n", i, j, k);
}
}
}
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP