Find the error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
19th Sep 2023, 8:05 PM
ClearCutLogic
ClearCutLogic - avatar
5 Answers
+ 1
code is running better i did not found any error . you can also print direct. ex:cout<<a+b;
20th Sep 2023, 9:35 PM
Dhruv Vishwakarma
Dhruv Vishwakarma - avatar
+ 5
ClearCutLogic , is this a quiz or do you have an issue with this code?
19th Sep 2023, 8:30 PM
Lothar
Lothar - avatar
+ 2
ClearCutLogic , There are 3 issues that I found in your code: 1. Unused variable "result": The variable `result` is not being used in the code. In C++, the compiler will warn you if you leave a variable without using it once. 2. if(**char o**=="+") {}:You should not specify the type of the variable you want to check condition if the variable is already declared, or even if the variable name does not exist. Instead, you should do something like: if(o== "+") {}. 3. Incorrect syntax for cout ``` cout("WRONG SYNTAX"); ```: Usually, when calling cout, the syntax is like this: std::cout<<"Something here"; std:: should be called if you don't include `using namespace std;` in the code.. For endline, add an additional <<endl after the string, or use "\n" inside the string.
20th Sep 2023, 5:39 AM
Dragon RB
Dragon RB - avatar
+ 1
Yeah, you got it right 👍 Thanks
21st Sep 2023, 12:14 AM
ClearCutLogic
ClearCutLogic - avatar
0
It's a issue just find the error
19th Sep 2023, 8:40 PM
ClearCutLogic
ClearCutLogic - avatar