如果两个数 a 和 b 是偶数,则证明它们的和 a + b 是偶数
数字系统是一种以某种方式使用符号和数字来表示数字的系统。你可以把它想象成一本数学语法书。一旦我们听到“数字”这个词 1,2,3,...... 立即在我们脑海中浮现。数字系统定义了它们的值、要执行的操作和其他属性。
数字类型
每个号码都是独一无二的。它有很多变化。因此,它可以被认为是自然数、整数、偶数、奇数、素数、合数等。
- 自然数 - 它包含从 1 开始的数字。
- 整数 - 它包含从 0 开始的数字。
- 偶数——能被 2 整除的数。
- 奇数——不能被 2 整除的数。
- 素数——只能被 1 和自身整除的数字。即只有两个因素
- 合数 – 能被 1 和自身和其他数整除的数。即两个以上的因素
偶数
那些是 2 的倍数的数称为偶数。例如 2, 4, 6, 8, 10, ... 等等。这些数字可以分成两个相等的组或对。奇数不能分成相等的数。让我们试着理解它,number 1st group 2nd group Equality 2 1 1 yes 4 2 2 yes 6 3 3 yes 8 4 4 yes
因此,偶数可以平分。让我们简要地看一下偶数的一些重要性质。
偶数的一些性质
- 两个偶数之和总是偶数。
num1 | num2 | num1+num2 |
---|---|---|
2 | 8 | 10 |
12 | 16 | 28 |
- 两个奇数之和总是偶数。
num1 | num2 | num1+num2 |
---|---|---|
5 | 5 | 10 |
7 | 9 | 16 |
- 当偶数和奇数相乘时,结果总是偶数。
num1 | num2 | num1 × num2 |
---|---|---|
9 | 8 | 72 |
3 | 6 | 18 |
- 当偶数除以 2 时,余数始终为零。
num1 | num2 | remainder of num1 ÷ num2 |
---|---|---|
12 | 2 | 0 |
80 | 2 | 0 |
如果两个数 a 和 b 是偶数,则证明它们的和 a + b 是偶数
解决方案:
Suppose,
a = 2 × X
b = 2 × Y
where X and Y are any integers that may be even or odd. Multiplying any number by 2 is always even so 2X and 2Y are even.
a + b = 2 × X + 2 × Y = 2 × (X + Y)
The result has a factor of 2. So, it is always even.
Example:
Input: a = 2, b = 4
Output: a + b = 2 + 4 = 6 = 2 × 3
Hence, it is even.
类似问题
问题 1:如果两个数 a 和 b 是偶数和奇数,那么它们的和 a + b 是奇数。
解决方案:
Suppose,
a = 2 × X
b = 2 × Y + 1
where X and Y are any two integers.
a + b = 2 × X + 2 × Y + 1 = 2 × (X + Y) + 1
The result is similar to b which is an odd number. Hence, it is odd.
Example:
Input: a = 4
Input: b = 7
Output: a + b = 4 + 7 = 11
Hence, it is odd.
问题 2:如果两个数 a 和 b 是奇数,那么它们的和 a + b 是偶数。
解决方案:
Suppose,
a = 2 × X + 1
b = 2 × Y + 1
where X and Y are any two integers
a + b = 2 × X + 1 + 2 × Y + 1 = 2 × X + 2 × Y + 2 = 2 × (X + Y + 1)
Which is a factor of 2, so it is even.
Example:
Input: a = 3
Input: b = 5
Output: a + b = 3 + 5 = 8
Hence it is even.
问题3:两个素数a和b之和是多少?
解决方案:
All the prime numbers are odd except 2 which is even.
Hence, it is concluded that the addition of any two prime numbers is always even if we ignore 2.
First argument:
a = even i.e. 2
b = odd
a + b = even + odd = odd (from property)
Hence, it is odd.
Second argument:
a = odd
b = odd
a + b = odd + odd = even (from property)
Hence, it is even.
问题 4:有哪些不同类型的数字系统?
解决方案:
There are four types of number Systems,
1. Binary Number System
This number system contains the digits or numbers having base 2 i.e. only 0 and 1. For example, 10012 is a binary number.
2. Octal Number System
This number system contains the digits or numbers starting from 0 to 7 and has a base 8. For example, 2428 is an octal number.
3. Decimal Number System
This number system contains the digits or numbers starting from 0 to 9 and has a base of 10. For example, 102410 is a decimal number.
4. Hexadecimal Number System
This number system contains the digits or numbers starting from 0 to 15 and has a base of 16.
A – 10
B – 11
C – 12
D – 13
E – 14
F – 15
For example, A45B16 is an hexadecimal number.