answersLogoWhite

0


Best Answer

Use a double or a float data type. While these are suitable for most floating point purposes, there may be times when you need to deal with extremely small or extremely large numbers with a higher degree of accuracy than is possible with the built-in types. In these cases you must either define your own data type or use a third-party data type. For instance, calculating the millionth decimal digit of pi cannot be achieved with the built-in types alone.

User Avatar

Wiki User

āˆ™ 11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make Decimal fraction in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can a float be displayed as a fraction in C?

As a decimal fraction, yes.


What is B plus B plus B plus C plus C plus C?

It is impossible to give any decimal/numeric value if we are not given the values of at least one variable, so the answer is B + B + B + C + C + C.


Can you make a website with C plus plus?

You cannot make a website with C++.


Can you make programs of C in visual c plus plus?

Yes.


What is 5 c in decimal form?

A decimal number is simply a way of representing a number in such a way that the place value of each digit is ten times that of the digit to its right. If it does not contain a fractional part then the decimal representation does not require a decimal point. So the decimal for 5 c is 5 c – as in the question. If you want it as a decimal fraction of some other quantity then you need to specify that second quantity.


Make programme for multification of three no in c plus plus?

result = a * b * c;


How can you write a fraction in a graphing calculator?

You can add fractions if you have a scientific calculator. All you have to do is press the b/c button. If you don't have one, you could always turn the fraction into a decimal.


When will you make a function inline in c plus plus?

yes,we can make function inline


How can you make a triangle in Visual C plus plus 2010?

Nevermind, I did it.


How do you find a decimal equivalent to a given fraction?

By hand, you do long division. Add a decimal point and as many zeros to the right of the decimal as necessary: 3/4 = 0.75 -------- 4 | 3.00 0 30 28 20 20 0 Sorry that I cannot make the numbers line up due to the proportional fonts.


How can you make a video game with c plus plus?

Cpp(C++) is used to make 'Many' programs because it is universal across many devices.


How do you make a decimal in to a fraction?

There are three different situations, corresponding to the three types of decimal numbers: terminating, repeating and those which are neither terminating nor repeating.Terminating: If the decimal number has d digits after the decimal point, then rename it as a fraction whose numerator is the decimal number without the decimal point, and the denominator is 10^d or 1 followed by d zeros.For example, 34.56d = 2 so the denominator is 100.and the fraction is 3456/100.Repeating: Until you become expert at this I suggest you do this in two stages (using c and d separately). Suppose there are c digits after the decimal place where the digits are non-repeating, and then you get a repeating pattern of a string of d digits. Then the numerator is the old original string including one lot of the repeated digits minus the original string with none of the repeating digits. The denominator is 10^c*(10^d - 1), which is a string of d 9s followed by c 0s.For example123.26159159… There are 2 digits, "26", after the decimal point before the repeats kick in so c = 2, and the repeating string "159" is 3 digits long so d = 3.So the numerator is 12326159 – 12326 = 12313833and the denominator is 99900Therefore the fraction is 12313833/99900.Non-terminating and non-repeating: There is no way to get a proper fraction since, by definition, this is an irrational number. The best that you can do is to round it to a suitable number of digits and then treat that answer as a terminating decimal.In all cases, you should check to see if the fraction can be simplified.