+ 4

Can I create a calculator That show the calculation differently.

Example : - 2+2 = 5 2*2 = 8 Or different calculation

30th Sep 2020, 1:59 PM
Karan
Karan - avatar
2 odpowiedzi
+ 2
I don't about c++ ,html or c but in python you can overload the operators using magic method like __add__ and internally print some other calculation which when used as + on two numbers will yield different result
30th Sep 2020, 2:19 PM
Abhay
Abhay - avatar
+ 4
You can overload this operators and code them as you want
30th Sep 2020, 2:09 PM
Saurabh Khade
Saurabh Khade - avatar