answersLogoWhite

0


Best Answer

#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

12y ago
This answer is:
User Avatar
More answers
User Avatar

Priya Muthu

Lvl 2
3mo ago

#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;

}

This answer is:
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
Related questions

C plus plus program to print number patterns?

bghjg


Program for print prime all number from 1 to 100 in foxpro?

Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.


How do you solve this program wap to print sum of a digit of an inputed number?

wap to print all the arnstrong no. between 100&amp;1000


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Program to print the greatest number in unix?

There is no such thing as 'the greatest number'. Here is a program in unix to prove it: echo 'for (i=1; i&gt;=0; i= i*2) print i,"\n";' | bc if you want to actually see the output use it this way: echo 'for (i=1; i&gt;=0; i= i*2) print i,"\n";' | bc | less -S


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


What does the print command do in Python?

The print command is a way to display output to the console. The hello world program, for example, can be written in python as simply print("Hello world") Other values can also be used in a print statement: a = 4 print(a) #will print the number 4


Writa a program to print a number in word eg if 972 is entered through the keyboard that should print nine seven two?

nine seven two


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


C program to print mark sheet of 5 subjects and the number of students is user input?

hhh


Program to print all the even numbers of an array in visual basic?

find even number in array


Write a unix program to print print a pattern?

echo 'print a pattern'