answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int i,j,k,l,m;

clrscr();

for(i=0;i<4;i++)

{

for(j=i+1;j<=4;j++)

{

printf("%d",j);

}

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

{

printf("%d",k);

}

printf("\n");

for(k=i;k>=1;k--)

{

printf("%d",k);

}

for(j=4;j>=i+1;j--)

{

printf("%d",j);

}

getch();

}

User Avatar

Wiki User

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

Wiki User

11y ago

#include <stdio.h> int main(int argc, char** argv){ 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("%d%d%d%d\n",a,b,c,d); } } } } return 0; }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to print all combination of a 4 digits number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


What are base two numerals?

In decimal we write a number by using a combination of 10 digits (0-9). In base 2, however, numbers are written by using a combination of only 2 digits (0 & 1). We call this number system binary.


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


Write a program to find the number of digits in the number?

#include &lt;stdio.h&gt; int main(int argc, char **argv) { if (argc&lt;1) { printf("Usage: %s number\n",argv[0]); return -1; } int digits=1, i=atoi(argv[1]); while (i/=10) ++digits; printf("%d\n",digits); }


How do you write 95billion32million659thousands4?

To write the number in digits, you would write it like this: 95,032,659,004.


What number is 8.4 million Write the number out with digits?

8,400,000.00


What is the largest number you can write with two digits?

99


Can you write out an irrational number in decimal form?

Not completely to its end. If you can completely write a number with digits, then it's a rational number.


Using while loop write a program which calculates the product of digits from 1 to 5 and also show these nos vertically?

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


How do you write seventeen million eight hundred eighteen thousand seven?

Write the digits in such a way that there are six digits to the right of the number of millions, and three digits to the right of the thousands. Fill out missing digits with zeros.


How do you write hundred thousands in digits?

100,000 your write the number followed by five zeroes