473,504 Members | 13,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++ weight and grams then calculate the cost

6 New Member
Php is Pesos

Assume that the cost for sending a letter from the Philippines to New York is
Php.22.50 for the first 10 grams or less, plus Php.5.75 for each additional gram beyond ten, plus a tax of 3%.
.......................... IN C++ BaSIC ......................................
Write a program that reads in the weight of a letter (in grams) and then calculate the cost....
.................................................. .................................................. ..............................

what will be the formula code?
what will be i use?

help me...................
Oct 14 '08 #1
1 2014
sicarie
4,677 Recognized Expert Moderator Specialist
Well, the description gave you a lot of information so I would break down the problem like this:

1) calculate the cost (derived formula from description)
2) create UI to gather variables to calculate cost
3) create function to calculate cost using formula from 1 and variables from 2
4) display cost

So, from the description below, do you know how to create a formula to calculate the cost? How would you do this by hand if someone asked you (say in a Math class) for a general formula to calculate this?

Assume that the cost for sending a letter from the Philippines to New York is
Php.22.50 for the first 10 grams or less, plus Php.5.75 for each additional gram beyond ten, plus a tax of 3%.
PS - please use periods only as necessary in the English language, strung long over multiple lines they make posts difficult to read. Thanks!
Oct 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
325
by: Ace | last post by:
Hello, I am trying to write a tool which calculates a html page weight. Suppose I have a html page which has 5 image references (each image has 10KB size), 1 CSS file of 10KB size. The total...
1
18521
by: Don Leverton | last post by:
Hi Folks, I *can* calculate the Gross Profit Percentage where both the Cost and SellPrice are known, using the formula: (SellPrice - Cost) / SellPrice = GPP eg ($24.92 - $14.95) / $24.92 =...
4
6352
by: Rich_C | last post by:
I'm sure this is very simple, but I have very little experience with javascript -- and what I do know isn't helping me here. I have a simple form where users can enter a quantity (qty) and cost...
3
2226
by: chyaf | last post by:
Ok, am new in this and have an assignment. I've read all I had to read and have been searching through the net and still don't have an answer, it may be simpler than I think.... How can I calculate...
3
6159
by: PamelaB | last post by:
I am trying to calculate the year end cost basis of equities held. I have downloaded all the transactions (purchases and sales) for the year and have them in a table. I need to calculate the value...
3
4088
by: sharma1985 | last post by:
Hi all, i m working on a bioinformatics problem. Regarding that i would like to know about the perl programming. I also like to know that how could i calculate the Isoelectric point and Molecular...
1
1938
by: scan87 | last post by:
Can someone please, please help me in finding the slotuion of the following problem: The cost of one-day travel cards for adult customers on the metro system is based on which zones they cover and...
3
11773
by: gator6688 | last post by:
I have to write a program that asks for a cost-per-item, number of items purchased, and a discount rate. Then it should calculate the total cost, tax due, and amount due. I have to use the...
7
10201
by: jamesnkk | last post by:
Hi, Although this question may not directly link to Access, but I think it a common question to those developer.so hope you could suggest a solution. How do I get the average cost for Item sold,...
0
7098
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
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7366
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...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.