问题如下。客户需要特定数量的纸张。纸上的指控是:
- .10 单张。
- 每张 0.055 以 100 的倍数计算。
- 每张 0.04 以 500 的倍数计算。
- 每张 0.03 以 1000 的倍数计算。
我知道你必须在某处使用 mod 部门。我不确定我的变量是否设置正确,我的大脑快要融化了。伤心吧?哈哈。我将非常感谢一些帮助。干杯:)
Option Explicit On
Imports system
Module paperp
Sub Main()
Dim papercost As Double
Dim onetpackage As Integer
Dim fivehpackages As Integer
Dim onehpackages As Integer
Dim singlesheets As Integer
Console.Writeline("Number of 1000 packages:")
onetpackage = convert.toint32(Console.Readline())
Console.Writeline("Number of 500 packages:")
fivehpackages = convert.toint32(Console.Readline())
Console.Writeline("Number of 100 packages:")
onehpackages = convert.toint32(Console.Readline())
Console.Writeline("Number of single sheets:")
singlesheets = convert.toint32(console.Readline())
Console.Out.Writeline("Number of 1000 packages:")
Console.Out.Writeline(onetpackage)
Console.Out.Writeline("Number of 500 packages:")
Console.Out.Writeline(fivehpackages)
Console.Out.Writeline("Number of 100 packages:")
Console.Out.Writeline(onehpackages)
Console.Out.Writeline("Number of single sheets:")
Console.Out.Writeline(singlesheets)
Console.Out.Writeline("Your total Cost is:")
Console.Out.Writeline(papercost)
End Sub
End Module