answersLogoWhite

0

#include<stdio.h>

int main()

{

int a,b,c,d;

for(a=1; a<5; a++)

{

for(b=1; b<5; b++)

{

for(c=1; c<5; c++)

{

for(d=1; d<5; d++)

{

if(!(a==b a==c a==d b==c b==d c==d))

printf("dd\n",a,b,c,d);

}

}

}

}

return 0;

}

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
More answers

#include<stdio.h>

int main()

{

int a,b,c,d;

for(a=1; a<5; a++)

{

for(b=1; b<5; b++)

{

for(c=1; c<5; c++)

{

for(d=1; d<5; d++)

{

if(!(a==b a==c a==d b==c b==d c==d))

printf("dd\n",a,b,c,d);

}

}

}

}

return 0;

}

User Avatar

Priya Muthu

Lvl 2
8mo ago
User Avatar

Add your answer:

Earn +20 pts
Q: C program to print all combinations of a 4-digit number?
Write your answer...
Submit
Still have questions?
magnify glass
imp