I am trying to make a program that can do 3 different function(info, calculator, and timer). Info and timer seem to be working fine but calculator is doing the wrong operation. Why is this and how can i fix it? Program is too long so here is the calculator bit. Thanks.
if(a,b = 0)
This is not doing what you seem to think. You probably don't need the 'a' and the comma. Also if 'a' and 'b' are integral variables, remember there are no fractions.
Line 22 is wrong. You are adding when you mean to multiply.
Regarding a/b, if a and b are both equal to zero then the result is undefined. Otherwise if b is zero then the result is +/- infinity, depending on the sign of a. Otherwise the result is a/b.