473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

What's the next higher whole number to .888?

Doing my taxes. When I divide $2220.00 by$2,500.00 you get .888 what is the next higher whole number, I need to know to complete worksheet
Feb 23 '18 #1
1 1189
donbock
2,426 Expert 2GB
First you need to decide which rounding rule is most appropriate for your application: round-down, round-up, round-to-nearest, round-to-zero, or round-away-from-zero. The first step in programming is to clearly understand the requirements.
  • Should 0.888 round to 1 or 0?
  • Should -0.888 round to -1 or 0?
  • Should 0.2 round to 0 or 1?
  • Should -0.2 round to -1 or 1?
  • What should 0.5 and -0.5 round to?

What language are you using? This is a C/C++ forum, but you said worksheet (which hints at Excel).
Feb 23 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: R Camarda | last post by:
I am trying to determine the next registered session of a student so I can calculate the number of skipped sessions. Scenario: I have a student registration summary table. One row for each...
3
by: David Marsh | last post by:
The program calculates the continued fraction representation of the input: #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv) { double diff, n, r, i; if(argc != 2)...
9
by: Steven D'Aprano | last post by:
I'm looking for some way to get the next floating point number after any particular float. (Any mathematicians out there: I am aware that there is no "next real number". But floats are not real...
6
by: le0 | last post by:
Hi Guys, Can you help me with this? Is there any function that I can use in getting a whole number Example: Input OutPut 12.3 12 1.63 1
5
by: John | last post by:
Which variable type (c#) can whole the largest whole number? I know this sounds silly but as double and decimal are made for numbers with decimals I am not sure. Also if anybody knows of any...
1
by: klabu | last post by:
T-SQL: How to round to the nearest WHOLE number ? so from -- to ------------- 170 --170 96.58 --97 thanks
3
by: blazinjoe1 | last post by:
Hey guys, would you mind helping me with the following When i calculate a percentage the answer for example comes out like this.. 57.142857142857142857142857140% Want to round this off to a...
6
jasjas
by: jasjas | last post by:
my Q is like this, i want to design a calculation which use the number user enter to "/" by 100. so , offcouse the result mayb in double or integer. after that my calculation just wanna user...
1
by: mertoman | last post by:
Hello, In Adobe LiveCycle Designer 8 I have a form field that users should be able to us to enter a whole number followed by a fraction or a decimal number such as: 45 1/8 or 45.125 I...
1
by: Andrea Robinson | last post by:
Hello! I need a little more help. I have managed to convert all my chars input from a text file into digits. Example: Input from file: $1,9,56#%34,9 !4.23#$4,983 Output: 1956 349 423 4983
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.