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
PIT_PIT [208]
3 years ago
12

(Rounding Numbers) An application of function floor is rounding a value to the nearest

Computers and Technology
1 answer:
Whitepunk [10]3 years ago
7 0

Answer:

Following are the program in the C++ Programming Language.

//header file

#include <iostream>

//header file for floor function

#include<math.h>

//using namespace

using namespace std;

//define main function

int main() {

 //set and initialize float type variable and value

 float a=12.3, c=1.45, d=165.345;

 //initialize it in other variable

 float x=a;

 //set float variable to store floor value

 float y=floor(x+5);

 //display output with message

 cout<<"before "<<x<<" and after the floor "<<y<<endl;

 //set float variable to store floor value

 y=floor(c+5);

 //display output with message

 cout<<"before "<<c<<" and after the floor "<<y<<endl;

 //set float variable to store floor value

 y=floor(d+5);

 //display output with message

 cout<<"before "<<d<<" and after the floor "<<y;

}

Output:

before 12.3 and after the floor 17

before 1.45 and after the floor 6

before 165.345 and after the floor 170

Explanation:

Here, we define the "main()" function and inside the main function.

  • Set and initialize three float data type variables "a", "c", "d" to 12.3, 1.45, 165.345.
  • Set the float data type variable "x" to store the value of the variable "a"
  • Again set float type variable "y" to store the floor value.
  • Then, Print message and output of the variable.
  • Again we repeat point 3 and 4 two times.
You might be interested in
Which of the following is NOT a type of technology user? Digital Collaborator Media Mover Desktop Veteran Drifting Surfer Inform
MrRissso [65]
<span>C: is the answer  because its the onley one that dose not have some form of person in it </span>
6 0
4 years ago
How does segmenting your network increase network security?
lys-0071 [83]

Answer:

By segmenting networks, it becomes easier to protect the most sensitive data that you have on your internally-facing network assets. The creation of a layer of separation between servers containing sensitive data and everything outside of your network can do wonders to reduce your risk of data loss or theft.

Explanation:

PLEASE MARK ME AS BRAINLIEST

5 0
3 years ago
I NEED HELP ASAP IM BAD AT THIS
ra1l [238]

A float is a floating point number. This means that's the number has a decimal place. Numbers with or without decimal places can be stored in a float variable but more commonly numbers with decimal points.

The correct choices are 1 and 3.4

4 0
3 years ago
What is meant by close to 75% of all viruses is contracted through friendly means?
snow_lady [41]

Answer: This means that even though we believe the information is coming from a trusted source, it could still contract a virus due to someone else hacking it or the original sending not being aware of the virus.

Explanation: Just because information comes from a trusted/friendly source does not mean the information is clear of potential threats. Viruses are able to hide in information and the sending may not be aware that the virus is hiding in the information.

4 0
4 years ago
Icons, arrows, shapes, and lines are considered what type of graphics?
monitta

Answer:

c I have took this test hefore

7 0
4 years ago
Other questions:
  • What does it mean if the phone number is red on iphone?
    13·1 answer
  • The picture that graphically represents the items you use in Windows is called a/an
    5·1 answer
  • TRUE OR FALSE!!!!!
    6·2 answers
  • Rich Text Format (RTF) is a universal file format that can include information such as text style, size, and color and can be re
    12·2 answers
  • Python
    14·1 answer
  • E. what component must be compatible with every other component of the computer?
    15·1 answer
  • Select the layer of the OSI model that is responsible for reformatting, compressing, and/or encrypting data in a way that the ap
    14·1 answer
  • Data are sent through a network on bundles called _______. select one:
    8·2 answers
  • What is after gigabyte
    12·2 answers
  • When the condition of an if statement is false, the computer will return an error message to the user.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!