|
|||
Linear EquationYou have been asked to write a program that can solve a simple linear equation. Input Specification
The first line of the input contains a single integer P
(1 ≤ P ≤ 1000), which is the number of data sets
that follow. Each data set consists of a single line containing one simple linear equation.
All equations are strings of less than 200 characters. Each equation will be in the form of
ax, followed by a single space, followed by a sign
“ ax + b = c, where x is the variable (real number), and a, b, c are nonnegative integers. Output Specification
For each data set, generate three lines of output. The first line contains
“
The third line is a blank line. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |