1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vera_Pavlovna [14]
2 years ago
11

Write the definition of a function that takes as input three numbers. The function returns true if the floor of the product of t

he first two numbers equals the floor of the third number; otherwise it returns false. (Assume that the three numbers are of type double.) (4)
Computers and Technology
1 answer:
SVETLANKA909090 [29]2 years ago
4 0

Answer:

Written in C++

bool checkfloor(double num1, double num2, double num3) {

   if(floor(num1 * num2) == floor(num3)){

       return true;

   }

   else {

       return false;

   }

}

Explanation:

The function written in C++

This line defines the function

bool checkfloor(double num1, double num2, double num3) {

The following if condition checks if the floor of num1 * num2 equals num3

   if(floor(num1 * num2) == floor(num3)){

       return true; It returns true, if yes

   }

   else {

       return false; It returns false, if otherwise

   }

}

See attachment for full program including the main

Download cpp
You might be interested in
When forced distribution is used to reduce leniency bias, this can cause __________ if a pfp system is in place?
ziro4ka [17]
When forced distribution is used to reduce leniency bias, this can cause <decreased trust> between employees if a pfp system is in place.
3 0
3 years ago
The Chart below from Google Trends shows the prevelance of some search terms in the United States between 2004 and the present.
ad-work [718]

The question is incomplete. The complete question could be found here: https://www.coursehero.com/file/p655c1i/a-Maintaining-privacy-of-the-information-stored-in-the-data-set-b-Scalability/

Answer:

B. Generally speaking, since 2009 more people use "red" in their search terms more than they use "blue", "yellow", "green", or "purple."

Explanation:

Based on the data provided in the figure, it can be inferred that the color 'red' was used the most in the search terms compared with the other colors such as purple or green. The other colors were also used in the search terms on google, however, the trend of those that used the color 'red' in the search terms is the highest.

8 0
3 years ago
(Java) Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100
iogann1982 [59]
Import java.util.Scanner;
public class MinutesConversion {
private static Scanner inputDevice;
public static void main(String[] args) {
int minutes, hours;
float days; // float for decimal point

inputDevice = new Scanner(System.in);
System.out.println("Please enter minutes for conversion >> ");
minutes = inputDevice.nextInt();
hours = minutes / 60;
days = hours / 24.0f;


System.out.println(+ minutes + " minutes is " + hours + " hour(s) or" + days " days");
}
}
6 0
3 years ago
Abby has received a request for a data set of actual data for testing a new app that is being developed. She does not want the s
Andreas93 [3]

Q:

Abby has received a request for a data set of actual data for testing a new app that is being developed. She does not want the sensitive elements of the data to be exposed. What technology should she use?

A:

Masking

4 0
2 years ago
Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The s
zimovet [89]

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

6 0
2 years ago
Other questions:
  • A corporation needs an operating system that allows the various teams in its office to network and collaborate on projects. Whic
    14·1 answer
  • Variables in PHP must begin with what symbol?
    11·1 answer
  • ¿Ha existido en la historia de nuestra humanidad alguien que hubiera hecho posible el sueño del ser humano en obtener energía li
    11·1 answer
  • _______ allows you to specify how a photo is positioned in the text of your document.
    11·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • Jack used primarily web sources for his informative speech about gun control. however, his over-reliance on the web site sponsor
    11·1 answer
  • Erewrxdnnefwn q wedsvd
    6·1 answer
  • PLZZZZ help will give brainlest
    5·1 answer
  • The rectangle shape in flowchart is used for
    12·1 answer
  • Identify the calculation performed by the following code.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!