+ 1

Please any one can help me this is true. But the run the program output has shown in error. And correct program.

https://code.sololearn.com/cE52pKugAikm/?ref=app

21st Jun 2020, 5:11 PM
Fight Yoyo
Fight Yoyo - avatar
5 odpowiedzi
0
Also you can't do ℅ and ^ with floats. num1 and num2 should be int for below operations. case '%': cout << num1%num2; break; case '^': cout << num1^num2; break;
21st Jun 2020, 5:18 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
0
Op is of char type and you are checking for string case check... case 'sqrt':
21st Jun 2020, 5:15 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
0
You need to add brackets into below line cout << num1 ^ num2; Like cout << (num1 ^ num2); Because operator Precedence of operator << is higher than ^.
21st Jun 2020, 5:25 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
0
How to use the string operation in sqrt function
22nd Jun 2020, 4:43 AM
Fight Yoyo
Fight Yoyo - avatar