00:01
In this video, we're going to be creating a c+ + program that will calculate the text for whether a user enters, whether the service was excellent, good, or typical.
00:16
And it will print out the price.
00:20
So to get started, we need to first create some global variables.
00:25
These global variables will be two of them, so we want to have charge in total.
00:35
Next, we want to have another one which is tip.
00:48
Oops, we want this to be an integer.
00:56
And what's the double, which is excellent, that equal to 0 .3.
01:13
And we want to do good and typical.
01:23
Typical is 1 .5 and 0 .2.
01:31
All right, that looks good.
01:36
So let's go over what we've done so far.
01:40
So we've created two variables where we have not added a value, the integer where we have not initialized a value, and three doubles where we've initialized a value.
01:57
Now we want to ask the user, actually we also want to create one more thing, which is a string and we want to call it place.
02:11
Now we want to ask the user to enter charge of meal, which we do c out and then the message and the end on the new line.
02:25
So we're going to take our charge variable and we are going to use c in and charge.
02:36
And this will call the user to input information.
02:40
Then we want to ask the user whether they would like to eat in or have carry out.
02:56
So we can create an if statement.
03:05
Actually before you create the if statement we need to then put the place and then we can create an if statement.
03:15
So for our condition with the if statement, we want to check if the user.
03:21
Has entered restaurant.
03:28
If they've entered restaurant, then we want to create a message for the user, where we ask them how they would rate their service...