Похожие чаты

Does anyone know how to remove redundant parentheses from expression? (e.g.

for expression (((1-1)+3)+3)*7*8 result should be ( 1 - 1 + 3 + 3 ) * 7 * 8)

1 ответов

7 просмотров

Commutative Law, Associative Law, and Distributive Law can provide enough heuristic insight for you to implement such. The commutative law in algebra states that when two elements are linked through some binary operation, the result is independent of the order of the elements. The commutative law of addition is: a + b = b + a The commutative law of multiplication is: a x b = b x a Subtraction is not commutative: a - b != b - a The associative law in algebra states that when three or more elements are linked together through a binary operation, the result is independent of how each pair of elements is grouped. The associative law of addition is: a + (b + c) = (a + b) + c The associative law of multiplication is: a × (b × c) = (a × b) × c Subtraction is not associative: a − (b − c) != (a − b) − c The distributive law in algebra describes an operation which when performed on a combination of elements is the same as performing the operation on the individual elements. The distributive law does not work in all cases of arithmetic. For example, multiplication over addition holds: a(b + c) = ab + ac whereas addition over multiplication does not: a + (b × c) != (a + b) × (a + c)

Похожие вопросы

Обсуждают сегодня

А чем вам питонисты не угодили?😂
.
79
всем доброго времени суток! имею вопрос: как понять ТОЧНО, что на нексус производится атака или он перегружен? исходные данные: - Nexus OSS 3.67.1-01 на OrientDB - Total co...
Michael Kostelcev
11
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
or any website to buy prepaid card with xmr that's not trocador that's down?
Umbrella Party Partner
18
Hi, I can't understand promises in JavaScript and what we should use them for (maybe the teacher didn't teach well XD). Do you have a solution for this? And are promises used...
A
29
Ещё такой вопрос. Мне необходимо хранить пароль пользователя локально. Для этого планирую использовать ini файл. Это для автозаполнения полей логин и пароль при авторизации. Е...
Евгений
19
Добрый день, LO Writer, проблема с нумерацией таблиц (вставка названия). У меня два стиля нумерованных списка, один для основного текста (вида 1.1.1) другой доя приложений (ви...
Виктор
6
My assets the Oceans at Binance, its displaying passive and no automatically convert, this situation will change?
Nationalizze
8
Xem delist ho rha hai agr naa bhechu toh kya hoga after 1 july?
ABHI
27
Ты просто гитлеровскую эстетику плохо понимаешь. Он же всё под Цезаря делал. А это как бы запрещённый приём в политике. Пиджаки они зачем все носят? Чтобы показать что они тип...
Ivan Kropotkin
4
Карта сайта