Reputation: 195
I want to calculate the following in Powershell
$x = 100
$y = 25
result = x * y%
Should be really simple, but I can't seem to come up with the right way to calculate the correct result in Powershell
Upvotes: 4
Views: 14340
Reputation: 23395
Divide by 100 to get the percentage:
$x = 100
$y = 25
$result = $x * ($y / 100)
Upvotes: 7