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
garri49 [273]
4 years ago
7

Write a program that prompts the user to input the decimal value of a double and outputs the number rounded to the nearest integ

er.

Computers and Technology
1 answer:
KengaRu [80]4 years ago
5 0

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

double n;

cout<<"Enter a decimal number: ";

cin>>n;

int Round= floor((n- floor(n))*2);

if(Round==0)

{

n= floor(n);

}

else n= ceil(n);

cout<<n;

return 0;

}

You might be interested in
Monica is writing a paper, and it needs to contain a certain amount of words. What Word Online feature can she use?IndentingProo
Greeley [361]

Answer:

Its word count so she knows how much words she is writing

Explanation:

7 0
2 years ago
Hey IM new uh what is this?
viva [34]
It’s an app where you can ask questions and get other people’s opinions on them. It’s basically cheating if ur doing classwork.
3 0
3 years ago
How many bits must be "flipped" (i.e., changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase that’s represented
Alexxandr [17]
Only one ... the third bit of the byte, numerical 32.  Every lower-case letter 
has a '1' in that place.  If that bit is changed to '0', then the code represents
the upper-case form of the same letter.
8 0
4 years ago
Read 2 more answers
1. A formula =A1+B2 is in cell D8. If you copy that formula to cell D9, what is the new formula in cell D9?
MaRussiya [10]
1. Answer is B   (D9=<span>A2+B3)
2. </span><span>C. identifies how many cells with data were in the range 
3. </span><span>A. ascending (smallest to largest)
</span><span>4. A. the current worksheet </span>
6 0
3 years ago
Using a Mouse
MariettaO [177]
I think it might be A. mouse sorry if I get it wrong tho hope it’s right.
7 0
3 years ago
Read 2 more answers
Other questions:
  • The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by ele
    7·1 answer
  • Which of the following situations represent(s) resource scarcity? I. Rapidly growing economies experience increasing levels of w
    9·1 answer
  • Research shows that a passive close to a cover letter leads to more interviews. Please select the best answer from the choices p
    8·2 answers
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was?
    13·2 answers
  • Please someone helpp
    12·2 answers
  • 23+ Composition refers to
    11·1 answer
  • A histogram titled Greeting card sales has date on the x-axis and cards (millions) on the y-axis. January is 1 card, February: 1
    12·2 answers
  • Que segnifica mmmju?​
    15·1 answer
  • Education leads to higher wages lower unemployment.* True or false
    5·1 answer
  • Select the correct answer.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!