0

Can you say where is a problem. It's a calculator

#include <iostream> using namespace std; float calc(int a, float c, float d){ switch(a) { case'+': cout << c+d; break; case'-': cout << c-d; break; case'*': cout << c*d; break; case'/': cout << c/d; break; } } void main() { cout << "Enter arithmetical action-,+,*,/"; float x,y; char o; cout << "Enter action"; cin << o: cin << x; cin << y; calc(o,x,y); }

5th Jan 2017, 8:51 PM
Š’Š»Š°Š“ŠøсŠ»Š°Š² ŠšŠ°Ń‰ŃƒŠŗ
Š’Š»Š°Š“ŠøсŠ»Š°Š² ŠšŠ°Ń‰ŃƒŠŗ - avatar
2 Answers
+ 7
put whitespace after case before quote.
5th Jan 2017, 8:54 PM
Valen.H. ~
Valen.H. ~ - avatar