0

Input the number of pages and the number of pages in a packet.

The cost of the packet is 350, and the cost of a loose sheet is 2. Calculate the total costs


What I did was:

Dim NOP, NOPIAP as, V1, V2, total as integer

'NOP is no of pages, NOPIAP is no of pages in a packet, V1 is variable #1, V2 is variable #2, total is the total cost

Input NOPIAP, NOP

V1 = NOP * 2

V2 = NOPIAP * 350

total = V1 + V2

Print total

I'm not sure whether what I did was right... the questions a little confusing.

Roman Melnyk
  • 1,097
  • 1
  • 8
  • 21
  • It's weird that the number of pages in a packet is going to be different but the cost is fixed. Shouldn't you calculate the number of packets you'll have with the input pages? Multiply by 350 and if there are any left pages that won't complete a packet, multiply by 2? – FirstOne Oct 17 '15 at 15:20
  • Oh yeah, you're right. I copied the question exactly like it is from my book.... Its a little poorly phrased – thezaynthe Oct 17 '15 at 16:16

0 Answers0