Hello,
I am new to this board and C++, so I do not even know what encase code in [] means, but I will try. I have an assignment I have been working on for a week. I have consulted my book and the web, but I have been unable to figure out the solution. I have most of the code completed, except I do not get the correct answer from my calculation.
Everything works except the amount due is incorrect. It is returning as $4e-039. I think it has something to do with the float and decimal precision, but I have tried everything I know, which is not much and cannot figure it out. Please help!
talk2tisa
13
Newbie Poster
Recommended Answers
Jump to PostOne of the things which stands out is that you are using
min
without actually having initialised it to some arbitary value.
Jump to Post1. Practice indenting your code. You'll find it a lot easier to follow what is going on.
Eg.//***************************************************************************** //Name: <Tisa Knight-Chandler> //Assignment: <Number 7> //File name: <assign7> //Date: <October 31, 2007> //Description This program shall obtain input from the keyboard and compute //a customer's cellular phone …
All 7 Replies
iamthwee
Salem
5,138
Posting Sage
Dani
4,074
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
talk2tisa
13
Newbie Poster
Salem
5,138
Posting Sage
talk2tisa
13
Newbie Poster
Salem
commented:
Excellent Job!
+13
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.