Preview

Solving C++

Satisfactory Essays
Open Document
Open Document
345 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Solving C++
Q#1: For each pair of numbers, when the division algorithm is used to divide a by d, what are the quotient q and remainder r?
(a) a = 88, d = 11.
(b) a = −29, d = 9
(c) a = 58237, d = 58168 (actual question is a = 58237, d = 58168 )

Solution:

(a) Because 88 = 11・8 + 0, we have q = 8, r = 0. (The fact that r = 0 says that 11|88.)

(b) Because −29 = 9・(−4) + 7, we have q = −4 and r = 7. (Note that although we can write −29 =9・(−3) + (−2), we cannot use −2 as r because r is not allowed to be negative.)

(c) a = d(q)+r

58237 = 58168(1) + 69

Quotient = 1, Remainder = 69

(c actual) We do not need to perform the exponentiations to find a and d. We need only observe that a is a multiple of d: 58237 = 58168・5869 (recall the rule for exponents: abac = ab+c). Therefore 58237 = 58168・5869 + 0 and we have q = 5869 and r = 0. (6)
Q #2:
a) Prove the following:
∃ an even integer n that can be written in two ways as a sum of two prime numbers.

Solution: Let n = 14. Then 14 = 11 + 3 = 7 + 7 and 3, 7, and 11 are all prime numbers.

b) Suppose that r and s are integers. Prove the following:
∃ an integer k such that 22r + 18s = 2k.

Solution: Let k = 11r + 9s. Then k is an integer because it is a sum of products of integers

2k = 2(11r + 9s), which equals 22r + 18s Q# 3:
The only divisors of 1 are 1 and −1 prove it. (8)

Solution:

Since 1·1 = 1 and (−1)(−1) = 1, both 1 and −1 are divisors of 1. Now suppose m is any integer that divides 1. Then there exists an integer n such that 1 = mn.
By Theorem, either both m and n are positive or both m and n are negative.
If both m and n are positive, then m is a positive integer divisor of 1. By Theorem, m ≤ 1, and, since the only positive integer that is less than or equal to 1 is 1 itself, it follows that m = 1. On the other hand, if both m and n are negative, then, by Theorem, (−m)(−n) = mn = 1. In this case −m is a positive integer divisor of 1,

You May Also Find These Documents Helpful

  • Good Essays

    Nt1310 Unit 2

    • 497 Words
    • 2 Pages

    7. If and then can be written in terms of p and q as (Hint: write…

    • 497 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Lab Report

    • 510 Words
    • 3 Pages

    Therefore the only numbers n that can possibly lead to primes are those that have no odd factors greater than…

    • 510 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Mat 540 Week 4

    • 4465 Words
    • 18 Pages

    SECTION – B Note: (i) Answer 10 questions (ii) Answer any 9 questions from the first 14 questions. Question No. 30 is Compulsory. (iii) Each question carries Two marks 10 × 2 = 20 16. If A = {4, 6, 7, 8, 9}, B = {2, 4, 6} and C = {1, 2, 3, 4, 5, 6} A , ^ B + Ch.…

    • 4465 Words
    • 18 Pages
    Powerful Essays
  • Good Essays

    Nt1310 Unit 3 Lab Report

    • 880 Words
    • 4 Pages

    I gathered many different simple rules and the number of divisors in some numbers, and my brother showed me the equation to find any numbers divisor. (It wasn’t at all useful because I have no idea what most of the stuff in the equation means and I can’t write it into Word.)…

    • 880 Words
    • 4 Pages
    Good Essays
  • Good Essays

    A rational number is any number in the form [pic], where a and b are integers and…

    • 1254 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    Financial Polynominal

    • 250 Words
    • 2 Pages

    Complete problem 70 on 311 page on Elementary and Intermediate Algebra show all steps of the division then incorporate words like foil, like terms, descending order, dividend, and divisor.…

    • 250 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    eci 114

    • 754 Words
    • 7 Pages

    Prove that the following is true for all positive integers n: n is even if and only if…

    • 754 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Finding Polynomials

    • 488 Words
    • 2 Pages

    The following is a completion of problem 70 on page 311 of Elementary and Intermediate Algebra. I will show how I divide like terms and the dividend by the divisor.…

    • 488 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Burning Up

    • 332 Words
    • 2 Pages

    12. If n is a rational number, then the solution to x2=n are rational numbers.…

    • 332 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Evolutionary theory states that all animals are motivated by the desire to ensure that their genes make it into the gene pool of the next generation. Natural selection is the tendency of individuals best adapted to their environment to survive and pass on their genes. Sexual selection is the probability of passing on our genes depends partly on any chances of survival but also on ability to attract a mate. Those who have genes for features which make them attractive are most likely to reproduce and pass all their genes on. This could be supported by Darwin’s suggestion that the peacock’s bright colouring was there to attract the peahen. Sexual selection is important for us as humans as some physical characteristics may not have developed to increase our survival rate, but simply to make us more sexually desirable. An example of this is eye/hair colour and distribution of muscle. Our sexual behaviour can be influenced genes, and this is similar no matter what culture you come from. They are also similar in terms of physical characteristics. This is a significant factor because it is a demonstration of the universal…

    • 953 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Problem of the Week

    • 587 Words
    • 3 Pages

    When I divided all the numbers by 7 I saw that 2, 3, and 6 all leave a remainder of 1, but not 4 and 5.…

    • 587 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    A company makes two types of bags, the shoulder bag and the backpack. Each day the company produces at least 60 bags, with a maximum of 50 backpacks. To keep up with demands the company must ensure that the number of backpacks produced is at least the same as or more than the number of shoulder bags produced.…

    • 1662 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    1.A. 162,87,75 87+75=162, 75+87+162, 162-87+75, 162-75=87 addition and subtraction. B. 2,4,2 2+2=4 2+2=4 4-2=2 4-2+2 Addition and Subtraction C. ¼, 1/6, 2/3 find a common denominator of 24 and solve. 1/4 x2/3=1/6, 2/3x1/4=1/6, 1/6 divided by 1/4=2/3 1/4divided by 1/6=2/3 Multiplication and Division. D. 2.2,6.6,12.12= NONE…

    • 347 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Biology Lab Report

    • 547 Words
    • 3 Pages

    Multiply the following numbers and express in terms of a x 10k where 1 ≤a ≤ 10…

    • 547 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Real Number and Pic

    • 704 Words
    • 3 Pages

    5. Write each of the following inequalities in interval notation and show them on the real number line.…

    • 704 Words
    • 3 Pages
    Good Essays