00:01
We are going to be creating a c+ + program that will do and perform basic functions, such as add, subtract, multiply, taking the module, and division.
00:16
So to get started, we want to get a stream, create a stream, and this string will be called user, will be called response.
00:29
Next, you want to then print out a message asking the user, enter what form of calculation, form of operation you would like to do.
00:52
And then you can print on a new line and give them a star or actually we'll do single quotes.
01:05
So the star for multiplication, a slash for divide.
01:16
Oops, a slash for divide.
01:22
What else? the plus sign for addition and then subtraction or subtraction and lastly the module sign and the module.
01:57
We're taking the model.
02:00
Here you go.
02:02
Now that we formatted our menu pretty much we can then get input, store the input and response variable.
02:16
Now we're going to check or if they've entered one of these options.
02:25
So let's do addition verse.
02:26
So if response equals, since it's a string you want to put it in quotes, it equals the star, we're going to ask the user, actually we'll create enter a and b, we'll create two integers up here for the user.
02:49
So we're going to print a message enter first number and then we'll score the input we're getting an input and storing in the variable a and then we're going to ask the user to enter a second number and then we're going to score that in b so now we're going to create another integer and call it product and we just simply do a and then you can do print results is then product or product variable so we can basically copy and paste this in a few more times else if and else up here so if they enter let's say the module module sign you just put the module sign here where it take the module you just change this to mod and and that's how you get the module for that.
04:16
And we'll do one more...