When learning programming, these
must
-have math questions!
(1)
Odd numbers (Odd) Even numbers (Even)
Odd numbers are integers that are not divisible by 2. An even number is an integer that is divisible by 2.
A leap year
is a year that is divisible by 4 but not divisible by 100, or a year that is divisible by 400.
A prime number,
also called a prime number, is an integer that has no other factors other than 1 and itself. Such as: 2, 3, 5, 7, 11, 13, 17, 19
https://en.wikipedia.org/wiki/Prime_number
http://mathworld.wolfram.com/PrimeNumber.html
Composite numbers
and A prime number, on the other hand, is a number that is divisible by other numbers besides 1 and itself. Such as: 4, 6, 8, 9, 10
https://en.wikipedia.org/wiki/Composite_number
http://mathworld.wolfram.com/CompositeNumber.html
Perfect number
A number that is exactly equal to its factor Sum. For example: 6=1+2+3
https://en.wikipedia.org/wiki/Perfect_number
http://mathworld.wolfram.com/PerfectNumber.html
Amicable number
If the sum of all your true divisors of two numbers is equal to me and the sum of all my true divisors is equal to you, then we are an Amicable number. Such as: (220, 284), (1184, 1210)
https://en.wikipedia.org/wiki/Amicable_numbers
http://mathworld.wolfram.com/AmicablePair.html
Palindrome number
A number is read and the reverse read are the same integer. Such as: 16461
https://en.wikipedia.org/wiki/Palindromic_number
http://mathworld.wolfram.com/PalindromicNumber.html
Narcissistic number
A three-digit number equals the sum of the nth power of each number . Such as: 153=1^3+5^3+3^3. There are 4 daffodils in total: 153, 370, 371, and 407.
The Armstrong number
has a wider range than the daffodil number and is not limited to three digits.
https://en.wikipedia.org/wiki/Narcissistic_number
http://mathworld.wolfram.com/NarcissisticNumber.htmlFibonacci
number
Each number is the sum of the two numbers preceding it. F(n)=F(n-1)+F(n-2) The specific numbers are: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...
Tabonacci The Tribonacci number
extends the concept of the Fibonacci sequence to three numbers. T(n)=T(n-1)+T(n-2)+T(n-3)
https://en.wikipedia.org/wiki/Fibonacci_number
http://mathworld.wolfram.com/FibonacciNumber. html
Pythagorean Triple
a^2+b^2=c^2
https://en.wikipedia.org/wiki/Pythagorean_triple
http://mathworld.wolfram.com/PythagoreanTriple.html
π
PI=4* (1-1/3+1/5-1/7+1/9-1/11+1/13-1/15+...)
https://en.wikipedia.org/wiki/Pi
http: //mathworld.wolfram.com/Pi.htmlHarmonic
series
H(n)=1+1/2+1/3+1/4+...+1/n
https://en. wikipedia.org/wiki/Harmonic_series_(mathematics)
http://mathworld.wolfram.com/HarmonicSeries.html
(2)
Summation (Sum)
1+2+3+...+n
https://en.wikipedia.org/wiki/Summation
http:// mathworld.wolfram.com/Sum.htmlFactorial n!=n*
(
n-1)...2*1
https://en.wikipedia.org/wiki/Factorial
http://mathworld.wolfram. com/Factorial.html
Factor/Divisor
https://en.wikipedia.org/wiki/Divisor
http://mathworld.wolfram.com/Divisor.html
Greatest Common Divisor (GCD: Greatest Common Divisor)
https: //en.wikipedia.org/wiki/Greatest_common_divisor
http://mathworld.wolfram.com/GreatestCommonDivisor.html
Least Common Multiple (LCM: Lowest Common Multipl)
https://en.wikipedia.org/wiki/Least_common_multiple
http://mathworld.wolfram.com/LeastCommonMultiple.html
(3) Print the graphic
pyramid Pyramid, rhombus Diamond
arrow and
other shapes
Pascal Triangle (Pascal Triangle)
also called Yang Hui triangle Ninety-
nine multiplication table (Multiplication Table)
(4) Tower of Hanoi (Hanoi Tower)
There are 3 pillars A, B and C. On A, 64 discs are placed from bottom to top in order from small to large. With B as an intermediary, move all the discs to C. During the move, it is required that any plate has either no plate under it, or only a larger plate than it.
https://en.wikipedia.org/wiki/Tower_of_Hanoi
Must-do math questions for beginners programming
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326251115&siteId=291194637
Ranking