Computer Science, asked by VISHALKUMARV22, 2 months ago

C Program to generate all combinations of 1, 2, 3 and 4 using for loop .

Answers

Answered by chhavitomar76
5

Answer:

include<stdio.h>

#include<conio.h>

int main()

{

int i, j, k; //for three numbers 1, 2 and 3

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

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

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

//First Method

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

//Second Method

//for removing repeated numbers we have to apply a condition (using if)

if(i!=j && i!=k && j!=k){

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

}

}

}

}

}

here is ur answer

from computer

mark le as brainlist...

Answered by nandanipaul123
2

Explanation:

I know only 1,2,3 my friend

Attachments:
Similar questions