+ 4

Why does not modulation work. Why if, for example: 5%2 output is an error , but not 5%2 = 1

Чому не працює ділення по модулю.Чому якщо, наприклад: 5%2 виводиться помилка, а не 5%2=1Why does not modulation work. Why if, for example: 5%2 output is an error , but not 5%2 = 1 https://code.sololearn.com/cJ2zllc68ZoH/?ref=app

17th Apr 2019, 1:23 PM
KolaTender
KolaTender - avatar
2 odpowiedzi
+ 4
Line 38, it should be like that: if((action == '/')||(action == '*')||(action == '+')||(action == '-')||(action == '%')) The condition “||(action == '%')” was missed.
17th Apr 2019, 7:36 PM
GreyWolf
GreyWolf - avatar
+ 4
Oops, how I forgot about it. Thank you very much! Soon I want to add degrees of numbers and square and cubic roots of numbers.
17th Apr 2019, 8:26 PM
KolaTender
KolaTender - avatar