
2. Write negations of the following statements: a. Jim is inside and tome is at the...
Translate the following English sentences into statements of predicate calculus. a. All programmers enjoy discrete mathematics b. Some integers are not odd c. Every integer that is divisible by 2 is even d. There exists a natural number that is not a positive integer Refer to the statements of predicate calculus you provided for part 1. Write the negation of each of those statements. .
Write a Java program to prompt for inputting an integer N, then enter N integers (a loop is needed), print the numbers user entered, and the amount of even and odd numbers (zero is even number). (1) Prompt for the user to input an integer and output the integer. (1 pts) Enter an integer: You entered: 5 (2) Prompt for the user to input N integers, output the numbers entered and the amount of even and odd numbers (9 pts)...
please answer questions #7-13
7. Use a direct proof to show every odd integer is the difference of two squares. [Hint: Find the difference of squares ofk+1 and k where k is a positive integer. Prove or disprove that the products of two irrational numbers is irrational. Use proof by contraposition to show that ifx ty 22 where x and y are real numbers then x 21ory 21 8. 9. 10. Prove that if n is an integer and 3n...
In Python 3 - Write a program that reads a sequence of integer inputs from the user. When the user is finished entering the integers, they will enter a 'q'. There is no need to check if the entry is a valid integer. All integers in the test data (input) will be between -255 and 255. The program should then print: The smallest and largest of the inputs. The number of even and odd inputs (0 should be considered even)...
WRITE A PROGRAM IN C++ THAT DECLARES AN INTEGER VECTOR V 1.)INITIALIZE THE VECTOR, V, WITH 10 INTEGERS WITH VALUES FROM 1 TO 10 2.)OUTPUT THE VECTOR IN DESCENDING ORDER, THEN ASCENDING ORDER 2.)ADD ALL THE EVEN NUMBERS 3.)ADD ALL THE ODD NUMBERS 4.)OUTPUT THE SUM OF EVEN INTEGERS 5.)OUTPUT THE SUM OF ODD INTEGERS 7.)OUTPUT THE PRODUCT OF EVEN INTEGERS 8.)OUTPUT THE PRODUCT OF ODD INTEGERS SAMPLE: Vector: 2 4 3 5 2 3 8 9 1 10 Ascending...
UUIDOR Quiz 2 - Ma Consider the following theorem. Theorem: The sum of any even integer and any odd integer is odd. Six of the sentences in the following scrambled list can be used to prove the theorem. By definition of even and odd, there are integers rands such that m = 2r and n = 2s + 1. By substitution and algebra, m + n = 2r + 25 + 1) = 2(r + s) + 1. Suppose m...
create computer program to translate the following statements into First Order Logic. You can use whichever language you prefer. PS: please read the question carefully. It said write a program with whichever language you prefer. a: all cheetahs are fast. Domain: animals; b: some cheetahs are fierce and dangerous. Domain: animals; c: every prime number is odd. Domain: integers; d: all prime numbers except two are odd. Domain: integers; e: all aliens are either green or orange. Domain: living creatures;...
Write a Python function that creates and returns a list of prime numbers between 2 and N, inclusive, sorted in increasing order. A prime number is a number that is divisible only by 1 and itself. This function takes in an integer and returns a list of integers.
1. (2 points) Write a negation for the following statements: (a) If N is a nonagon, then N is a polygon. (b) If r is divisible by 56, then x is divisible by 7 and r is divisible by 8.
Write a C program to do the following 1) request user to enter 10 integer into an array 2) sort the array in ascending order 3) display the sorted array 4) count the number of odd and even number in the array and print out the result 5) add the value of the odd number and even number and calculate the average of the odd and even number. display the result 6) write function addNumber() to add all the number...