Answer:
def floor_sum(number1, number2):
total = number1 + number2
if total >= 0:
return int(total)
else:
return int(total) - 1
print(floor_sum(1.1, 3.05))
Explanation:
*The code is in Python.
Create a function called floor_sum that takes two parameters, number1 and number2
Sum them and set it to the total
Check if the total is positive number or 0, return the integer part of the total. Otherwise, subtract 1 from the integer part of the total and return it.
Call the function with given parameters in the question and print the result
Note that if the result is a negative value like -5.17, the floor of the result is -6 not -5.
Answer:
Out of the four options , the option that is most suitable is
option b. Cost, demand
<u>cost</u> or to <u>demand</u>
Explanation:
Going rate pricing is a form of competition based pricing. This pricing is commonly used for homogeneous products i.e., products with very minute distinction or variation among producers.
This type of pricing is based on setting price on the basis of the prevailing market trends in pricing of goods or services, so, the prices are largely based on the competition in the market rather than considering its own cost and demand.
Answer:
// A optimized school method based C++ program to check
// if a number is composite.
#include <bits/stdc++.h>
using namespace std;
bool isComposite(int n)
{
// Corner cases
if (n <= 1) return false;
if (n <= 3) return false;
// This is checked so that we can skip
// middle five numbers in below loop
if (n%2 == 0 || n%3 == 0) return true;
for (int i=5; i*i<=n; i=i+6)
if (n%i == 0 || n%(i+2) == 0)
return true;
return false;
}
// Driver Program to test above function
int main()
{
isComposite(11)? cout << " true\n": cout << " false\n";
isComposite(15)? cout << " true\n": cout << " false\n";
return 0;
}
Explanation: