473,386 Members | 1,790 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,386 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 1192
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.