Eight consecutive three digit positive integers have the following property: each of them is divisible by...
Find how many positive integers with exactly four decimal digits, that is, positive integers between 1000 and 9999 inclusive, have the following properties: (a) are divisible by 5 and by 7. (b) have distinct digits. (c) are not divisible by either 5 or 7.
For Exercises 1-15, prove or disprove the given
statement.
1. The product of any three consecutive integers is even.
2. The sum of any three consecutive integers is
even.
3. The product of an integer and its square is
even.
4. The sum of an integer and its cube is even.
5. Any positive integer can be written as the sum of
the squares of two integers.
6. For a positive integer
7. For every prime number n, n +...
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. Double the number. b. Reverse the digits of the number. c. Raise the number to the power of 2, 3, or 4. d. Sum the digits of the number. e. If the number is a two digit number, then raise the first digit to the power of the second digit....
Introduction: Ten digit ISBN numbers are created so that the first nine digits are information digits and the last digit is a check digit. T his last number helps people notice and correct mistakes that might be made in recording the information digits. The same is true for thirteen digit ISBN numbers. Here is a ten digit ISBN number: 0-13-149498-8. The digit 0 indicates the book is written for English-speaking people. The number 13 and the number 149498 identify the...
Which of the following is true? Multiple answers: You can select more than one option ОА x^3 =Big-Theta(x^4 + x^3) B x^4 =Big-Theta(x^3 + x^4) O с x^3 =Big-Theta(x^3 + 4x +17) O D x^3 + 4x +17 =Big-Theta(x^3) o E 3^n = Big-Theta(2^n) O F 2^n =Big-Theta(3^n) Among 100 people, there are at least 8 of them born in each month. А True O B False What is the divisibility rule for 4? O А Check whether sum of...
The place values for the eight binary digits used in IPv4 addressing are as follows: 128, 64, 32, 16, 8, 4, 2, 1. Expand this range to include an additional four bits. Do this by recording the place values for 211, 210, 29, and 28. 1111 Express the decimal value 2001 in binary by placing 1s in the binary positions requiring the addition of the corresponding place value. Place 0s in the binary positions where the corresponding place value should...
1. This is a fun "mind-reading" trick you can do with your students. Have each of your students think of a card. Each card has a numerical value: An Ace is worth 1, deuce 2,..., Jack 11, Queen 12, King 13; and each suit has a value: a Club is worth 5, Diamond 6, Spade 7, and Heart 8. Let each student take the numerical value of their card (for example a Jack is 11) and add the next consecutive...
C PROGRAM A barcode scanner for Universal Product Codes (UPCs) verifies the 12-digit code scanned by comparing the code’s last digit (called a check digit) to its own computation of the check digit from the first 11 digits as follows: 1. Calculate the sum of the digits in the odd-numbered positions (the first, third… eleventh digits) and multiply this sum by 3. 2. Calculate the sum of the digits in the even-numbered positions (the second, fourth… tenth digits) and add...
Suppose you have a sorted array of positive and negative integers and would like to determine if there exist some value of x such that both x and -x are in the array. Consider the following three algorithms: Algorithm #1: For each element in the array, do a sequential search to see if its negative is also in the array. Algorithm #2:For each element in the array, do a binary search to see if its negative is also in the...
C+ using pointers
2. Determine the following information about each value in a list of positive integers. Is the value a multiple of 7, 11, or 13? a. b. Is the sum of the digits odd or even? (parameter output returns 0 for even, 1 for odd) Is the value a prime number? (parameter output returns 0 nonprime, 1 for prime) c. You should write three functions: 1)input, 2) processing, 3)output 1) Input wil have one output parameter of type...