Algorithm Analysis
To solve the problem, it is necessary to calculate the value of the given expression.
Algorithm Implementation
Read the value of the variable .
scanf("%lf", &x);
Calculate the value of the variable .
y = (x * x + 3 * x - 4) / (2 * x - 3) - (x + 2) / (x * x - 5 * x + 7);
Output the result to the thousandths.
printf("%.3lf\n", y);
Java Implementation
import java.util.*; class Main { public static void main(String[] args) { Scanner con = new Scanner(System.in); double x = con.nextDouble(); double y = (x * x + 3 * x - 4) / (2 * x - 3) - (x + 2) / (x * x - 5 * x + 7); System.out.print(y); con.close(); } }
Python Implementation
x = float(input()) y = (x * x + 3 * x - 4) / (2 * x - 3) - (x + 2) / (x * x - 5 * x + 7) print(y)