AndzrejGFX
Contributor
Hey guys, I'm stuck with a problem.
My dilemma is getting the processing to work with for..next statements.
Can anyone help me with this? It would be greatly appreciated
The assignment is to allow the user to enter in a number from 1 - 12 and determine what the
total price of that day's Christmas gifts will be.
The input file data shown in the book would be as follows:
Items for this project:
• The name of the input file will be called Christmas.txt. Please hardcode the name into your Open
statement.
• The amounts for the items in the input file are each items. So, for example, if it is day five, the
cost per day would be:
$27.50 (the price of a partridge in a pear tree)
+ $50.00 (the price of two turtle doves)
+ $15.00 (the price of three French Hens)
+ $280.00 (the price of four calling birds)
+ $300.00 (the price of five golden rings)
$672.50 total for 5 days
• The processing to determine the day's gift cost must be done with a For..Next loop. There will
be no If statements in the cost determination processing.
Nor will you use an IfElse structure or a Select Case structure, or anything else to make
decisions. The only processing that will be accepted will be a For..Next loop!!
total price of that day's Christmas gifts will be.
The input file data shown in the book would be as follows:
Code:
"partridge in a pear tree", 27.50
"turtle doves", 25
"French hens", 5
"calling birds", 70
"gold rings", 60
"geese-a-laying", 25
"swans-a-swimming", 1000
"maids-a-milking", 4.25
"ladies dancing", 289.50
"lords-a-leaping", 292.50
"pipers piping", 95.75
"drummers drumming", 95
Items for this project:
• The name of the input file will be called Christmas.txt. Please hardcode the name into your Open
statement.
• The amounts for the items in the input file are each items. So, for example, if it is day five, the
cost per day would be:
$27.50 (the price of a partridge in a pear tree)
+ $50.00 (the price of two turtle doves)
+ $15.00 (the price of three French Hens)
+ $280.00 (the price of four calling birds)
+ $300.00 (the price of five golden rings)
$672.50 total for 5 days
• The processing to determine the day's gift cost must be done with a For..Next loop. There will
be no If statements in the cost determination processing.
Nor will you use an IfElse structure or a Select Case structure, or anything else to make
decisions. The only processing that will be accepted will be a For..Next loop!!
My dilemma is getting the processing to work with for..next statements.
Can anyone help me with this? It would be greatly appreciated