Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Generate all possible combinations of 1, 2, 3 using for loop.

Write a program to Generate all combinations of 1, 2 and 3 using for loop.



#include<stdio.h>
main()
{

int i, j, k;

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

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

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

printf("\n%d %d %d", i, j, k);
}



}

}





The file can be found at:
Download File



This post first appeared on Learning To Program, please read the originial post: here

Share the post

Generate all possible combinations of 1, 2, 3 using for loop.

×

Subscribe to Learning To Program

Get updates delivered right to your inbox!

Thank you for your subscription

×