00:01
Program that will calculate the discount price for books.
00:05
So to get started, we need to create four different variables.
00:11
And these four different variables are going to be a double.
00:16
Doubles are a way we can hold numbers with decimal values in programming.
00:24
So let's say we have college textbook that costs $100 for $25.
00:36
And let's say the discount price is 10%.
00:45
And we want to make sure you can root this to decimal form.
00:50
We want to consider the amount of books we purchase, which let's say is 10.
01:05
Next, we want to do the total.
01:08
So double price.
01:12
So we want to do the college textbooks times the amount of textbooks.
01:20
So the price times the amount we purchased.
01:30
And we want to subtract this by the amount of books purchase and the price times the discount price.
01:55
And we want to do print it out, so console.
01:59
Rightline, total.
02:08
And then we want to use our price variable where we did the map...