The product depends on the sign of the integer. For suppose assume two integer a and b, their magnitude is equal |a| = |b|.i.e, for example a = 10 then also b=10.
Now considering the sign of the two integers,
(+a) ×(+b) =ab,
(+a) ×(-b) = -ab,
(-a) ×(+b) = -ab,
(-a) ×(-b) = ab.
Find a counterexample to the statement. The product of any integer and itself is even.
A positive integer is a prime number if its only positive integer divisors are itself and 1. Write a program to determine whether or not a given integer is prime. The program should contain two functions: main: to ask the user for a positive integer and to print the result isPrime: to determine whether the user's input is prime by testing all possible divisors. This function should return two values: variable_1: a Boolean value indicating whether the number is prime...
A positive integer n is “perfect” if the sum of its positive factors, excluding itself, equals n. Write a perfect function in Haskell that takes a single integer argument and returns the list of all perfect numbers up to that argument. Report all of the perfect numbers up to 1000 (i.e. call 1000)
Q2. Suppose that you can sell as much of a product (in integer units) as you like at $60 per unit. Your marginal cost (MC) for producing the qth unit is given by: MC=7qMC=7q This means that each unit costs more to produce than the previous one (e.g., the first unit costs 7*1, the second unit (by itself) costs 7*2, etc.). If fixed costs are $100, what is the profit at the optimal integer output level? Please specify your answer...
(Palindrome integer) Write the functions with the following headers: # Return the reversal of an integer, e.g. reverse(456) returns # 654 def reverse(number): # Return true if number is a palindrome def isPalindrome(number): Use the reverse function to implement isPalindrome. A number is a palindrome if its reversal is the same as itself. Write a test program that prompts the user to enter an integer and reports whether the integer is a palindrome.
4. My VERY FANCY LUNCHBOX always maintains itself at the SAME TEMPERATURE and the SAME VOLUME. What happens to the PRESSURE if I put TWICE as many molecules into it? 5. This time, I keep the same NUMBER of molecules and the SAME VOLUME in my VERY FANCY LUNCHBOX. What happens to the PRESSURE if I DOUBLE the TEMPERATURE?
Discrete mathematics Prove that the product of an odd integer and an even integer is always even.
PunNumber class returns interesting (or fun) information about the integer representation of itself The PunNumber object can return the number of digits it has, the sum of its digits, whether or not it's prime number, and whether or not it's a perfect number. An incomplete definition of the FunNumbe class appears below. creates and manipulates a number, which is funl public class FunNumber Constructs a FunNumber representation of the integer n. Assumes n0 @param n the FunNumber value public FunNumber...
QUESTION 6 4 points Which of the following types of promotions gives away the product itself or a closely related product price-oriented promotions product-oriented promotions off invoice allowance sweepstakes
Write a program that finds the temperature, as an integer , that is the same in both Celsius and Fahrenheit. The formula to convert from Celsius to Fahrenheit is: Fahrenheit = 32 + (nine fifths) times Celsius.