← All problemsSign in

Solve the Equation

Given a linear equation in one variable of the form num1 operator num2 = num3 where any one of num1, num2 or num3 is the variable x and other two are integers. Operators can be any one of + , - , / or * , there may or may not be spaces given between the numbers and operator or ‘=’ sign. Find the value of x. Note: The equation will always be a valid equation. Input - The first line of the

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start