[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Buckys C++ Programming Tutorials – 7 – Basic Arithmetic
by
Tags:
Comments
42 responses to “Buckys C++ Programming Tutorials – 7 – Basic Arithmetic”
-
How to get the exact float values in C++? I did 81/20 with float but it still gives me 4 as answer. Why is it so?
could you please give me the notation for float values
-
So is there a way to print the number and the remainder together using one variable?
-
why does the build log get angry when I use the x button to close the program.
-
This is a programming tutorial not a 4th grade math tutorial, if you're gonna teach me math you should expect that I know how to do 7th grade math and below, maybe even some calculus.
-
3:49 5th*
-
These tutorials are wonderful! You did an amazing job!
-
very lovely tutorial i love the short and meaningful tutorial another channels are shit
-
bidmas
brackets
indicies
division
multiplication
addition
subtractionalso bodmass
but i don't know what o stands for. -
why can't he just say follow the order of operation…..
-
what if i want to print 40.5
-
PEMDAS
-
-
It's PEMDAS bucky and if it's like homework math it goes like this 1. Parentheses, 2. Exponents, 3. Multiplication & Division going from the left so if you have 3 * 8 / 2 you'd do it in the order you see so it'd be 12. 4, Addition and Subtraction in the same kind of from the left situation as multiplication and division! Please Excuse My Dear Aunt Sally or Please Excuse My Dumb Ass Sister whichever helps you memorize it more!
-
If the associate property part confuses you, I'll simplify it for you. You can easily understand it by using one word: PEMDAS. P = Parentheses, E = Exponents, M = Multiplication, D = Division, A = Addition, S = Subtraction.
I'll give you an example and explain why the answer is the way it is.
ex. (4 * 5) + 3[squared] * 534 / 4
The answer is 1221.5
The way we got it was using PEMDAS.
Here is how to do it with PEMDAS (I'll show my work for you)
(4 * 5) + 3[squared] * 534 / 4
20 + 3[squared] * 534 / 4
20 + 9 * 534 / 4
20 + 4806 / 4
20 + 1201.5
1221.5
First, we did the Parentheses, and got 20.
Then, we solved the Exponent(2) of 3, and got 9.
After that, we Multiplied 9 and 534, and got 4806.
Next, we Divided 4806 by 4, and got 1201.5.
Finally, we Added 20 and 1201.5, and got 1221.5.PLEASE NOTE: Parentheses(no matter where in the equation it is,) is done first, then the Exponent(s) are(is) done second (no matter where they or it is/are in the equation), then when we get to Multiplication and Division, if Multiplication is on the left side of the equation, it is done after that, BUT, if it is on the right side, and Division is on the left, the Division is done next, then the Multiplication is done after that, then we get to Addition and Subtraction, if the Addition is on the left side, the Addition is done next, BUT if it is on the right side, and the Subtraction is on the left, the Subtraction is done next. Also, if there is just Multiplication or just Division whichever one is the only one there, it will be done after Parentheses and Exponents, Also, if it is just Addition or Subtraction, whichever one is there will be done after the Multiplication and Division, BUT if there are not Exponents, or Parentheses, the Multiplication and or Division will be done next, and so on.. I think you get the point.
I hope this helped! 😛
-
The way I learned it, Brackets first, then division, multiplication, addition, subtraction.
-
Addition (+)
Subtraction (-)
Multiplication (*)
Divison (/)
Get the remainder for division (%)
-
I find it really funny how much the views drop as you get further into the tutorial.
So many people who just thought "Man, this is not just about pressing the button that says 'create program'? Fuck it, I'm out" -
Made this program for fun, after watching this tutorial:
cout << "what number do you want to be divided?: t";
cin >> x;cout << "what number do you want to divide " << x << " with?: t";
cin >> division;while (y != 0)
{
while (y != 0 && YOLO == 0) //set x % division = 0, so you can count how many times that it need to "overflow"
{
y = (x + z) % division; //find out when y = 0
z++;
//cout << y << " , " << z << " , " << x << endl;
}y = (x + z) % division; //Findes y
z++;
z2++; //count how big y can become.
YOLO++;
}y = x % division; //Find the normal modulus to x
y = y * (divideFactor / z2); //Find how many procent it is out of 1
x = x / division; //finde the devides numbercout << "The result is " << x << "." << y << endl;
-
FWIW, the associative property is related but different. You mean "algebraic order of operations." The acronym to remember the algebraic order of operations in PEMDAS for Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction. The associative property says that (1 + 2) + 3 is the same as (2 + 3) + 1. For like operators, order does not matter.
-
I know math. Don't teach me math. I've come here to learn c++ SO FUKCING TEACH ME C++ U CHEECKY UCNT
-
it's not associative property, it's PEMDAS/ order of operatons
-
You are a genius Bucky !!!
-
that moment he says "if u remember back to 7th grade math" yet your still in 7th grade LOL
-
People forget that in pemdas multiplication doesn't always come before division its really whatever comes first in the problem from left to right. Same with addition and subtraction.
-
Notice how the c++ terminal does not follow the order of operations at all haha
-
it'
s not the associative property, its order of operations. -
oh,,,you never reply me
-
thank-you very much for all videos loved it
-
One doubt i'm not in seventh but I like learning coding I have learnt the associative property in grade 6 (the grade I am in now) but by any chance does the computer use the Brackets Of Division Multiplication Addition Subtraction (BODMAS Method) ?
-
It's really same in every country In India it's BODMAS in UK it's BIDMAS in USA it's GEDMAS different name same meaning.
Separated by lands united by maths 😀
-
I learned Python from this guy and now i am learning C++. Thank you
-
BIDMAS
B = Brackets
I = Indices
D = Division
M = Multiplication
A = Addition
S = Subtraction -
Thanks Bro for the these tutorials!
-
The stuff he learned in 7 or 8 I learned in 5 or 6
-
basically B.I.D.M.A.S in the UK
Brackets ()
Indices ^
Division /
Multiplication *
Addition +
Subtraction – -
LOL way back in seventh grade you say. I am starting seventh grade after this summer LEL!
-
Bucky, that's not the associative property. That's the order of operations, or in programmer jargon, operator precedence.
The associative property is an observation of addition and multiplication that says the the same operation can be grouped in any way, and will still be the same.
I.e. 3 + 7 + 5 will always be 15, no matter what you add first, and 2 * 3 * 5 will always be 30 regardless of which pair you multiplied first. This breaks down when different operations are happening in the same equation, which is where operator precedence and "terms" come in. Term being a word for one side of an addition (which includes its inverse — subtraction). E.g. 15x + 7 is two terms: 15x and 7.
Assoc property does not cover an equation with more than one type of operation. So (15x) + 7 and 15(x + 7) mean two different things.
Commutative property is the ability to re-order operations without consequence. 15 + 7 is the same as 7 + 15. To my knowledge, only addition and multiplication exhibit the commutative and associative properties. For example, 2^10 and 10^2 have wildly different outcomes: 1,024 and 100. So exponentation is not commutable. Further, (2^3)^2 and 2^(3^2) are also wildly different. 64 and 512, respectively. So it's not associable either.
Distributive property says you can multiply terms together by distributing the multiplicand.
5(x + 7) is the same as 5(x) + 5(7), or 5x + 35
Factoring is doing that in reverse. E.g. in 5x + 35, both terms are divisible by 5, so it can be rewritten as 5(x + 7).
That's algebra 101 folks.
-
It's called P.E.M.D.A.S, and I learned it in 5th grade. And I'm going into 6th. What's wrong with this picture?
-
that's also called B.O.D.M.A.S.
-
I think the order of operations/associative property is learned in 5th or 6th grade, actually.
-
This shit is fun. This dude is fun. I'm learning so much. Sigh..you know he's good when you still comprehend at x2 speed. lol.
-
Easy box xD
Leave a Reply