How to solve the problem of non-repetitive numbers in C language
This article mainly introduces the relevant knowledge of C language how to solve the problem of non-repetitive numbers, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to solve the problem of non-repetitive numbers in C language. let's take a look.
Topic: there are 1, 2, 3, 4 digits, how many three digits that are different from each other and have no repetition? How much is it?
Program analysis: the numbers that can be filled in 100 digits, ten digits and individual digits are 1, 2, 3 and 4. Make up all the permutations and then remove the ones that don't meet the conditions.
The code is as follows:
# include
Int main ()
{
Int i,j,k
Printf ("\ n")
For (iTunes 1)