i am trying to make a simpel calculator but it wont work, i have written the code. but on line 34 and 38 the error Message comes up; "[i]expected primary-expression before 'else'" and "expected ';' before 'else'"... what shall i do to solve it??? please help im cind of new to this, and im 13 years old so...
On line 34 and 38 you are assigning values to calculation instead of comparing them. Change = to == ( = is assignment operator while == is a comparison operator)
Multiple statements for ifelseif andelse must be surrounded by curly braces {}
You need to declare calculation as char calculation; because you need to get a character and line 21 must be scanf("%c", &calculation); // %c indicates that you need to get a single character
You are missing if keyword on line 38 -> elseif (calculation == '-')