-
Need help with a program
I got in a little over my head when I took a VB class this semester, I had almost no experience on a computer, let alone programming. This latest program has me a bit comfused and I figured this is the place for help...
Normally our assignments have a demo program with code to go along with it, and it has helped me enough so far to pass the class, this time I am not so lucky.
Basically I have to have the data from a text file on a disk show up in a listbox when a button is clicked. Here is the actual problem:
--The table below shows prices for items in a store. Suppose the prices will be reduced for a sale. The new price with be computed by reducing the old price by 10%, rounding to the nearest dollar, and then subtracting one cent. If the new price is greater than the old price, the old price is use as the sale price. Write a program to display the output shown below:
-------------------------------------------
Item Sale Price
Gumshoes 35.99
Sandals 18.99
Shirt 6.99
Handbag 29.99
Syrup 6.75
Vest 21.99
NightShirt 23.99
-------------------------------------------
Original prices in the txt file before showing up on the listbox are:
39.00
21.00
7.75
33.00
6.75
24.00
26.00
-----
Anyway, I know this is probably easy for most of you, but I have been trying for 2 hours and have no clue what to do. I would appreciate any and all help I could get on this. Thanks. . .
-
man, I wish i could take a vb course at my skewl (easy credit).
but it looks like some of your values here are wrong, eather that or my brains fried and thats a definite possiblity
this is forumula i used to check your numbers
newnum = (Math.Round(oldnum*.9))-0.01
for example reg price: 39.00, new price: 35.99
35.1=39*.9 'find 90% of 39 or 39-10% of 39
35=Round(35.1)
34.99=35-.01
34.99 <> 35.99
did you forget to say sumtin?
also post the whole contents of the data file.