Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #12543 > unrolled thread
| Started by | Adrienne Boswell <arbpen@yahoo.com> |
|---|---|
| First post | 2014-01-05 00:26 +0000 |
| Last post | 2014-01-06 20:47 +0100 |
| Articles | 16 — 8 participants |
Back to article view | Back to comp.lang.php
Math Formula Question - Need Ideas Adrienne Boswell <arbpen@yahoo.com> - 2014-01-05 00:26 +0000
Re: Math Formula Question - Need Ideas Richard Damon <Richard@Damon-Family.org> - 2014-01-04 19:33 -0500
Re: Math Formula Question - Need Ideas Allodoxaphobia <knock_yourself_out@example.net> - 2014-01-05 17:56 +0000
Re: Math Formula Question - Need Ideas Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-05 13:15 -0500
Re: Math Formula Question - Need Ideas John Smith <johnsmithjsm@live.com> - 2014-01-07 14:57 +0000
Re: Math Formula Question - Need Ideas The Natural Philosopher <tnp@invalid.invalid> - 2014-01-05 00:37 +0000
Re: Math Formula Question - Need Ideas Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-04 20:20 -0500
Re: Math Formula Question - Need Ideas Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-05 00:54 +0000
Re: Math Formula Question - Need Ideas Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-04 20:22 -0500
Re: Math Formula Question - Need Ideas Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-05 16:40 +0000
Re: Math Formula Question - Need Ideas Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-05 13:16 -0500
Re: Math Formula Question - Need Ideas Adrienne Boswell <arbpen@yahoo.com> - 2014-01-05 23:09 +0000
Re: Math Formula Question - Need Ideas Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-05 18:53 +0100
Re: Math Formula Question - Need Ideas Adrienne Boswell <arbpen@yahoo.com> - 2014-01-05 22:56 +0000
Re: Math Formula Question - Need Ideas Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-05 18:11 -0500
Re: Math Formula Question - Need Ideas Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-06 20:47 +0100
| From | Adrienne Boswell <arbpen@yahoo.com> |
|---|---|
| Date | 2014-01-05 00:26 +0000 |
| Subject | Math Formula Question - Need Ideas |
| Message-ID | <XnsA2ABA6A53901Farbpenyahoocom@78.46.70.116> |
I have a math question to which I can't find the answer. Here is the scenario: Someone goes to a store and has $100.00 worth of items. The merchant gives the customer a 10% discount, so only $90.00 is sent to the bank. Of the original amount, $10.00 goes to the customer for the discount, $80.00 goes to the merchant, $10.00 goes for a processing fee. But those amounts have to be calced on the original amount, not what the bank got. I need a formula to find the original amount if I have the percentage (10%) and the amount the bank got ($90.00). I know in my head that the original amount is $100.00, but I have to do it programatically. I know this is probably dead simple, but I just can't get my head around it. Thanks in advance. -- Adrienne Boswell Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/ The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/ Please respond to the group so others can share
[toc] | [next] | [standalone]
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Date | 2014-01-04 19:33 -0500 |
| Message-ID | <5M1yu.164337$as5.106525@en-nntp-14.dc1.easynews.com> |
| In reply to | #12543 |
On 1/4/14, 7:26 PM, Adrienne Boswell wrote: > I have a math question to which I can't find the answer. Here is the > scenario: > > Someone goes to a store and has $100.00 worth of items. The merchant > gives the customer a 10% discount, so only $90.00 is sent to the bank. > Of the original amount, $10.00 goes to the customer for the discount, > $80.00 goes to the merchant, $10.00 goes for a processing fee. But those > amounts have to be calced on the original amount, not what the bank got. > I need a formula to find the original amount if I have the percentage > (10%) and the amount the bank got ($90.00). I know in my head that the > original amount is $100.00, but I have to do it programatically. > > I know this is probably dead simple, but I just can't get my head around > it. > > Thanks in advance. > 10% is 0.1 You got the $90 by multiplying the original $100 by (1-0.1) to get $90, so you can divide the $90 by (1 - 0.1) to get the original $100
[toc] | [prev] | [next] | [standalone]
| From | Allodoxaphobia <knock_yourself_out@example.net> |
|---|---|
| Date | 2014-01-05 17:56 +0000 |
| Message-ID | <slrnlcj75r.21fn.knock_yourself_out@vps.jonz.net> |
| In reply to | #12544 |
On Sat, 04 Jan 2014 19:33:31 -0500, Richard Damon wrote: > On 1/4/14, 7:26 PM, Adrienne Boswell wrote: >> I have a math question to which I can't find the answer. Here is the >> scenario: >> >> Someone goes to a store and has $100.00 worth of items. The merchant >> gives the customer a 10% discount, so only $90.00 is sent to the bank. >> Of the original amount, $10.00 goes to the customer for the discount, >> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those >> amounts have to be calced on the original amount, not what the bank got. >> I need a formula to find the original amount if I have the percentage >> (10%) and the amount the bank got ($90.00). I know in my head that the >> original amount is $100.00, but I have to do it programatically. >> >> I know this is probably dead simple, but I just can't get my head around >> it. >> >> Thanks in advance. >> > 10% is 0.1 > > You got the $90 by multiplying the original $100 by (1-0.1) to get $90, > so you can divide the $90 by (1 - 0.1) to get the original $100 Then, state and local taxes are usually calc'd on the original price, not the discounted price.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-01-05 13:15 -0500 |
| Message-ID | <lac7fi$d9i$1@dont-email.me> |
| In reply to | #12551 |
On 1/5/2014 12:56 PM, Allodoxaphobia wrote: > On Sat, 04 Jan 2014 19:33:31 -0500, Richard Damon wrote: >> On 1/4/14, 7:26 PM, Adrienne Boswell wrote: >>> I have a math question to which I can't find the answer. Here is the >>> scenario: >>> >>> Someone goes to a store and has $100.00 worth of items. The merchant >>> gives the customer a 10% discount, so only $90.00 is sent to the bank. >>> Of the original amount, $10.00 goes to the customer for the discount, >>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those >>> amounts have to be calced on the original amount, not what the bank got. >>> I need a formula to find the original amount if I have the percentage >>> (10%) and the amount the bank got ($90.00). I know in my head that the >>> original amount is $100.00, but I have to do it programatically. >>> >>> I know this is probably dead simple, but I just can't get my head around >>> it. >>> >>> Thanks in advance. >>> >> 10% is 0.1 >> >> You got the $90 by multiplying the original $100 by (1-0.1) to get $90, >> so you can divide the $90 by (1 - 0.1) to get the original $100 > > Then, state and local taxes are usually calc'd on the original price, > not the discounted price. > Incorrect. State and local taxes are calculated on the actual (discounted) selling price. At least that's so in the United States. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | John Smith <johnsmithjsm@live.com> |
|---|---|
| Date | 2014-01-07 14:57 +0000 |
| Message-ID | <kb5oc9p7qds7hgttutjhhodquha55irdgt@4ax.com> |
| In reply to | #12552 |
On Sun, 05 Jan 2014 13:15:17 -0500, Jerry Stuckle <jstucklex@attglobal.net> wrote: >> > >Incorrect. State and local taxes are calculated on the actual >(discounted) selling price. > >At least that's so in the United States. This looks more like tax law than php however I have to admit the discussion is interesting. -- John
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2014-01-05 00:37 +0000 |
| Message-ID | <laa9g0$j5a$1@news.albasani.net> |
| In reply to | #12543 |
On 05/01/14 00:26, Adrienne Boswell wrote: > I have a math question to which I can't find the answer. Here is the > scenario: > > Someone goes to a store and has $100.00 worth of items. The merchant > gives the customer a 10% discount, so only $90.00 is sent to the bank. > Of the original amount, $10.00 goes to the customer for the discount, no., The customer gets the goods. > $80.00 goes to the merchant, If you say so $10.00 goes for a processing fee. who gets that? But those > amounts have to be calced on the original amount, not what the bank got. > I need a formula to find the original amount if I have the percentage > (10%) and the amount the bank got ($90.00). I know in my head that the > original amount is $100.00, but I have to do it programatically. > are you for real? $90/(1-0.1) = $100 0.1 being 10%.. > I know this is probably dead simple, but I just can't get my head around > it. > A degree in media studies...or was it 'climate science' ?...;-) > Thanks in advance. > -- Ineptocracy (in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-01-04 20:20 -0500 |
| Message-ID | <laac1h$hhi$1@dont-email.me> |
| In reply to | #12545 |
On 1/4/2014 7:37 PM, The Natural Philosopher wrote: > On 05/01/14 00:26, Adrienne Boswell wrote: >> I have a math question to which I can't find the answer. Here is the >> scenario: >> >> Someone goes to a store and has $100.00 worth of items. The merchant >> gives the customer a 10% discount, so only $90.00 is sent to the bank. >> Of the original amount, $10.00 goes to the customer for the discount, > > no., The customer gets the goods. > Plus $10.00 of the original $100.00 >> $80.00 goes to the merchant, > If you say so > That's one of the original conditions. > $10.00 goes for a processing fee. > > who gets that? > Maybe a credit card processor? Maybe the product is being shipped and this is postage and handling? Who knows. More importantly, it doesn't matter. It's another of the original conditions. > But those >> amounts have to be calced on the original amount, not what the bank got. >> I need a formula to find the original amount if I have the percentage >> (10%) and the amount the bank got ($90.00). I know in my head that the >> original amount is $100.00, but I have to do it programatically. >> > > are you for real? > > $90/(1-0.1) = $100 > > 0.1 being 10%.. > Well, we know you can do first grade math, anyway. But then the OP SAID it was 10%. Maybe you have some problem understanding him? >> I know this is probably dead simple, but I just can't get my head around >> it. >> > A degree in media studies...or was it 'climate science' ?...;-) > >> Thanks in advance. >> > > Maybe you should get your second grade education. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2014-01-05 00:54 +0000 |
| Message-ID | <laaagn$1bo$1@dont-email.me> |
| In reply to | #12543 |
On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote: > I have a math question to which I can't find the answer. Here is the > scenario: > > Someone goes to a store and has $100.00 worth of items. The merchant > gives the customer a 10% discount, so only $90.00 is sent to the bank. > Of the original amount, $10.00 goes to the customer for the discount, > $80.00 goes to the merchant, $10.00 goes for a processing fee. But > those amounts have to be calced on the original amount, not what the > bank got. I need a formula to find the original amount if I have the > percentage (10%) and the amount the bank got ($90.00). I know in my > head that the original amount is $100.00, but I have to do it > programatically. > > I know this is probably dead simple, but I just can't get my head around > it. > > Thanks in advance. If a * b = c then a = c / b b = c / a In your case, 100 * 0.9 = 90 Therefore to get the original, 90 / 0.9 = 100 0.9 being the decimal fraction that equates to 90%, ie the amount the customer paid after discount. Observation though, processing fees are usually a % of the amount paid. eg if a card payment processing service charges 1.25%, that would be 1.25% of the payments made, so in your case: Invoice: = 100.00 Discount: 10% = 10.00 Amount due: = 90.00 ======================== Processing: 10% = 9.00 Amount to bank: = 81.00 The payment processing is only concerned with the amount of the transaction that it actually processes, not some other intermediate calculation between the merchant and the customer. Consider the case where the customer is given a 95% discount by the store. If your processing service still charges 10% of the original amount, the your processing fee is more than actual transaction value: Invoice: = 100.00 Discount: 10% = 95.00 Amount due: = 5.00 ================================== Processing: 10% of 100.00 = 10.00 Amount to bank: = -5.00 ???? Error The correct math for this case is more likely: Invoice: = 100.00 Discount: 10% = 95.00 Amount due: = 5.00 ======================== Processing: 10% = 0.50 Amount to bank: = 4.50 As a general rule, payment processing systems only concern themselves with the amounts that they are handling, and not other amounts that may have appeared in calculations made outside of their own systems. Of course, if you're working on something like a sales commission basis, that might be a different set of rules, as you might expect to be receiving a commission based on the listed price, regardless of whether the items are sold at a discount or not. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-01-04 20:22 -0500 |
| Message-ID | <laac4j$hhi$2@dont-email.me> |
| In reply to | #12546 |
On 1/4/2014 7:54 PM, Denis McMahon wrote: > On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote: > >> I have a math question to which I can't find the answer. Here is the >> scenario: >> >> Someone goes to a store and has $100.00 worth of items. The merchant >> gives the customer a 10% discount, so only $90.00 is sent to the bank. >> Of the original amount, $10.00 goes to the customer for the discount, >> $80.00 goes to the merchant, $10.00 goes for a processing fee. But >> those amounts have to be calced on the original amount, not what the >> bank got. I need a formula to find the original amount if I have the >> percentage (10%) and the amount the bank got ($90.00). I know in my >> head that the original amount is $100.00, but I have to do it >> programatically. >> >> I know this is probably dead simple, but I just can't get my head around >> it. >> >> Thanks in advance. > > If a * b = c then > > a = c / b > > b = c / a > > In your case, 100 * 0.9 = 90 > > Therefore to get the original, > > 90 / 0.9 = 100 > > 0.9 being the decimal fraction that equates to 90%, ie the amount the > customer paid after discount. > > Observation though, processing fees are usually a % of the amount paid. > > eg if a card payment processing service charges 1.25%, that would be > 1.25% of the payments made, so in your case: > > Invoice: = 100.00 > Discount: 10% = 10.00 > Amount due: = 90.00 > ======================== > Processing: 10% = 9.00 > Amount to bank: = 81.00 > > The payment processing is only concerned with the amount of the > transaction that it actually processes, not some other intermediate > calculation between the merchant and the customer. > > Consider the case where the customer is given a 95% discount by the > store. If your processing service still charges 10% of the original > amount, the your processing fee is more than actual transaction value: > > Invoice: = 100.00 > Discount: 10% = 95.00 > Amount due: = 5.00 > ================================== > Processing: 10% of 100.00 = 10.00 > Amount to bank: = -5.00 ???? Error > > The correct math for this case is more likely: > > Invoice: = 100.00 > Discount: 10% = 95.00 > Amount due: = 5.00 > ======================== > Processing: 10% = 0.50 > Amount to bank: = 4.50 > > As a general rule, payment processing systems only concern themselves > with the amounts that they are handling, and not other amounts that may > have appeared in calculations made outside of their own systems. > > Of course, if you're working on something like a sales commission basis, > that might be a different set of rules, as you might expect to be > receiving a commission based on the listed price, regardless of whether > the items are sold at a discount or not. > Actually, Denis, since the original statement was the processor gets $10, he would get $10/$90 or 11.11% of the sale. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2014-01-05 16:40 +0000 |
| Message-ID | <lac1ti$hru$1@dont-email.me> |
| In reply to | #12548 |
On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote: > On 1/4/2014 7:54 PM, Denis McMahon wrote: >> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote: >> >>> I have a math question to which I can't find the answer. Here is the >>> scenario: >>> >>> Someone goes to a store and has $100.00 worth of items. The merchant >>> gives the customer a 10% discount, so only $90.00 is sent to the bank. >>> Of the original amount, $10.00 goes to the customer for the discount, >>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But >>> those amounts have to be calced on the original amount, not what the >>> bank got. I need a formula to find the original amount if I have the > Actually, Denis, since the original statement was the processor gets > $10, he would get $10/$90 or 11.11% of the sale. Yeah, I took the statement "those amounts have to be calced on the original amount" as implying that the processing fee was being calculated on the pre-discounted total, as was the discount. Which is what led me to querying the nature of the processing fee, and whether given it's nature it's being calculated at the right point, because I would expect that a [payment] processing fee would normally be related to the amount of the actual transaction, which as you say is $10 / $90 in this case. I'm also wondering if Adrienne is perhaps using the term "processing fee" in a way other than that which I expect it to be used - we do get the "some people use a slightly different english" problem here occasionally. eg if "processing" was something like shipping and packing, $10 per order, then it would be $10 regardless of the original amount or the discounter amount, but then I wouldn't expect the processing fee to be calculated from the transaction cost at all, I'd expect it to be mainly a function of the total volume / weight and possibly item count of the goods involved. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-01-05 13:16 -0500 |
| Message-ID | <lac7h5$d9i$2@dont-email.me> |
| In reply to | #12549 |
On 1/5/2014 11:40 AM, Denis McMahon wrote: > On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote: > >> On 1/4/2014 7:54 PM, Denis McMahon wrote: >>> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote: >>> >>>> I have a math question to which I can't find the answer. Here is the >>>> scenario: >>>> >>>> Someone goes to a store and has $100.00 worth of items. The merchant >>>> gives the customer a 10% discount, so only $90.00 is sent to the bank. >>>> Of the original amount, $10.00 goes to the customer for the discount, >>>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But >>>> those amounts have to be calced on the original amount, not what the >>>> bank got. I need a formula to find the original amount if I have the > >> Actually, Denis, since the original statement was the processor gets >> $10, he would get $10/$90 or 11.11% of the sale. > > Yeah, I took the statement "those amounts have to be calced on the > original amount" as implying that the processing fee was being calculated > on the pre-discounted total, as was the discount. > > Which is what led me to querying the nature of the processing fee, and > whether given it's nature it's being calculated at the right point, > because I would expect that a [payment] processing fee would normally be > related to the amount of the actual transaction, which as you say is > $10 / $90 in this case. > > I'm also wondering if Adrienne is perhaps using the term "processing fee" > in a way other than that which I expect it to be used - we do get the > "some people use a slightly different english" problem here occasionally. > > eg if "processing" was something like shipping and packing, $10 per > order, then it would be $10 regardless of the original amount or the > discounter amount, but then I wouldn't expect the processing fee to be > calculated from the transaction cost at all, I'd expect it to be mainly a > function of the total volume / weight and possibly item count of the > goods involved. > Agreed. The entire question isn't real clear - no wonder the OP is having problems with it. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Adrienne Boswell <arbpen@yahoo.com> |
|---|---|
| Date | 2014-01-05 23:09 +0000 |
| Message-ID | <XnsA2ACA467F25FFarbpenyahoocom@78.46.70.116> |
| In reply to | #12553 |
Jerry Stuckle <jstucklex@attglobal.net> wrote > On 1/5/2014 11:40 AM, Denis McMahon wrote: >> On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote: >> >>> On 1/4/2014 7:54 PM, Denis McMahon wrote: >>>> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote: >>>> >>>>> I have a math question to which I can't find the answer. Here is >>>>> the scenario: >>>>> >>>>> Someone goes to a store and has $100.00 worth of items. The >>>>> merchant gives the customer a 10% discount, so only $90.00 is sent >>>>> to the bank. Of the original amount, $10.00 goes to the customer >>>>> for the discount, $80.00 goes to the merchant, $10.00 goes for a >>>>> processing fee. But those amounts have to be calced on the >>>>> original amount, not what the bank got. I need a formula to find >>>>> the original amount if I have the >> >>> Actually, Denis, since the original statement was the processor gets >>> $10, he would get $10/$90 or 11.11% of the sale. >> >> Yeah, I took the statement "those amounts have to be calced on the >> original amount" as implying that the processing fee was being >> calculated on the pre-discounted total, as was the discount. >> >> Which is what led me to querying the nature of the processing fee, >> and whether given it's nature it's being calculated at the right >> point, because I would expect that a [payment] processing fee would >> normally be related to the amount of the actual transaction, which as >> you say is $10 / $90 in this case. >> >> I'm also wondering if Adrienne is perhaps using the term "processing >> fee" in a way other than that which I expect it to be used - we do >> get the "some people use a slightly different english" problem here >> occasionally. >> >> eg if "processing" was something like shipping and packing, $10 per >> order, then it would be $10 regardless of the original amount or the >> discounter amount, but then I wouldn't expect the processing fee to >> be calculated from the transaction cost at all, I'd expect it to be >> mainly a function of the total volume / weight and possibly item >> count of the goods involved. >> > > Agreed. The entire question isn't real clear - no wonder the OP is > having problems with it. > I probably should have put processing in quotes, we're using that term for something that includes membership fees, and other charges. Sometimes, when you write a word correctly, it looks wrong, so you ask someone else how to spell it. That's what happened to me here, I didn't think I was doing it right and got myself all confused. I want to thank everyone who responded for their help and confirming what I thought. I feel better now. -- Adrienne Boswell Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/ The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/ Please respond to the group so others can share
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-01-05 18:53 +0100 |
| Message-ID | <4768632.UfNXPBq84B@PointedEars.de> |
| In reply to | #12543 |
Adrienne Boswell wrote: > Someone goes to a store and has $100.00 worth of items. The merchant > gives the customer a 10% discount, so only $90.00 is sent to the bank. > Of the original amount, $10.00 goes to the customer for the discount, > $80.00 goes to the merchant, $10.00 goes for a processing fee. But those > amounts have to be calced on the original amount, not what the bank got. > I need a formula to find the original amount if I have the percentage > (10%) and the amount the bank got ($90.00). I know in my head that the > original amount is $100.00, but I have to do it programatically. > > I know this is probably dead simple, but I just can't get my head around > it. Do your own homework. [You cannot be serious asking a question regarding simple arithmetic (percentage calculation, for crying out loud) in a newsgroup for a programming language — without showing any attempt to solve it by yourself, I should add.] PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
[toc] | [prev] | [next] | [standalone]
| From | Adrienne Boswell <arbpen@yahoo.com> |
|---|---|
| Date | 2014-01-05 22:56 +0000 |
| Message-ID | <XnsA2ACA22583698arbpenyahoocom@78.46.70.116> |
| In reply to | #12550 |
Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote > Adrienne Boswell wrote: > >> Someone goes to a store and has $100.00 worth of items. The merchant >> gives the customer a 10% discount, so only $90.00 is sent to the >> bank. Of the original amount, $10.00 goes to the customer for the >> discount, $80.00 goes to the merchant, $10.00 goes for a processing >> fee. But those amounts have to be calced on the original amount, not >> what the bank got. I need a formula to find the original amount if I >> have the percentage (10%) and the amount the bank got ($90.00). I >> know in my head that the original amount is $100.00, but I have to do >> it programatically. >> >> I know this is probably dead simple, but I just can't get my head >> around it. > > Do your own homework. > > [You cannot be serious asking a question regarding simple arithmetic > (percentage calculation, for crying out loud) in a newsgroup for a > programming language — without showing any attempt to solve it by > yourself, I should add.] > > > PointedEars Yes, I can be serious asking a question like this. Have you ever looked at something you spelled correctly, and it doesn't look right? Sometimes, I think something is harder than it is, and confuse myself. That's what happened here. -- Adrienne Boswell Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/ The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/ Please respond to the group so others can share
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-01-05 18:11 -0500 |
| Message-ID | <lacorj$vpo$1@dont-email.me> |
| In reply to | #12554 |
On 1/5/2014 5:56 PM, Adrienne Boswell wrote: > Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote > >> Adrienne Boswell wrote: >> >>> Someone goes to a store and has $100.00 worth of items. The merchant >>> gives the customer a 10% discount, so only $90.00 is sent to the >>> bank. Of the original amount, $10.00 goes to the customer for the >>> discount, $80.00 goes to the merchant, $10.00 goes for a processing >>> fee. But those amounts have to be calced on the original amount, not >>> what the bank got. I need a formula to find the original amount if I >>> have the percentage (10%) and the amount the bank got ($90.00). I >>> know in my head that the original amount is $100.00, but I have to do >>> it programatically. >>> >>> I know this is probably dead simple, but I just can't get my head >>> around it. >> >> Do your own homework. >> >> [You cannot be serious asking a question regarding simple arithmetic >> (percentage calculation, for crying out loud) in a newsgroup for a >> programming language — without showing any attempt to solve it by >> yourself, I should add.] >> >> >> PointedEars > > Yes, I can be serious asking a question like this. Have you ever looked > at something you spelled correctly, and it doesn't look right? > Sometimes, I think something is harder than it is, and confuse myself. > That's what happened here. > > Adrienne, Don't pay any attention to Pointed Head. He's just being his usual pedantic self. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-01-06 20:47 +0100 |
| Message-ID | <25283432.POFBRBLUIU@PointedEars.de> |
| In reply to | #12554 |
Adrienne Boswell wrote:
> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote
>> Adrienne Boswell wrote:
>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>> gives the customer a 10% discount, so only $90.00 is sent to the
>>> bank. Of the original amount, $10.00 goes to the customer for the
>>> discount, $80.00 goes to the merchant, $10.00 goes for a processing
>>> fee. But those amounts have to be calced on the original amount, not
>>> what the bank got. I need a formula to find the original amount if I
>>> have the percentage (10%) and the amount the bank got ($90.00). I
>>> know in my head that the original amount is $100.00, but I have to do
>>> it programatically.
>>>
>>> I know this is probably dead simple, but I just can't get my head
>>> around it.
>>
>> Do your own homework.
>>
>> [You cannot be serious asking a question regarding simple arithmetic
>> (percentage calculation, for crying out loud) in a newsgroup for a
>> programming language — without showing any attempt to solve it by
>> yourself, I should add.]
>
> Yes, I can be serious asking a question like this. Have you ever looked
> at something you spelled correctly, and it doesn't look right?
> Sometimes, I think something is harder than it is, and confuse myself.
> That's what happened here.
Sigh. [psf 10.1] You have a problem with basic arithmetic, not PHP. Why
are you asking in a PHP newsgroup (other than to troll here)? *At least*
you should have the decency to ask in a *math* newsgroup (where people will
tell you, iff they do not ignore you, that you learn these things in
highschool – or its national equivalent).
Please read <http://www.catb.org/~esr/faqs/smart-questions.html> before you
post again.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web