I am very thankful to @RandellDawson,. He is my best mentor. Now, I have written a simple calculation program. I do my best to write the code in a good way. I used for loop to reduce the repetition of the code. As well used different functions to manage the codes. As I am a very basic learner, I wish to get suggestions, if this is going on good direction.
You are going to need to deal with rounding issues common to all known programming languages. For example, if I enter 0.1 and 0.2 and click the Add button, I expect to only see 0.3. Unfortunately, the value shown is 0.30000000000000004. There are ways of handling this issue. The key is to understand what level of precision is needed for a given calculation.
I am sure you can find several articles on how to deal with the round-off errors in your application.
Not really. The answer should be just 0.3 without the extra zero. You need to figure out what digits are significant to the final answer. What happens if I want to add 0.001 and 0.0008, your new solution would just show 0.00 instead of 0.0018
@RandellDawson, Sir, I googled lots and still googling but, could not got the idea to fix this round of errors. I still want to to try more, just want one hint from you, Do we need to write the program for it? or we have any inbuilt function.
Thank you