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.

Q: How do you make Decimal fraction in c plus plus?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

As a decimal fraction, yes.

Smart-C: Complete Programming Book available on Flipkart (Rating - 5 Star) The book deals with one such Great programming language āCā. The book is designed to help the reader program in C. Great care has been taken in making the content interesting and understandable. Each module is added with multiple graphic images to make content easily understandable

C++ is easier to use as you have to learn slightly less and script slightly to make your function(s) work.

g++, gdb and make. A simple search for "Cygwin c++" will tell you all you need to know.

C: there are no methods in C. C++: no.

Related questions

As a decimal fraction, yes.

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.

You cannot make a website with C++.

Yes.

result = a * b * c;

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.

yes,we can make function inline

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.

Nevermind, I did it.

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

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.

35 IS a decimal. And the value of 35 c, as a decimal, depends on the value of c.