Problemi həll etmək üçün verilmiş ifadənin dəyərini hesablamak lazımdır.
x dəyişənin dəyərini oxuyun.
scanf("%lf", &x);y dəyişənin dəyərini hesablayın.
y = (2 * x) / sqrt(x * x + 1) - sqrt(x * x + 1) / (x * x * x);Nəticəni minlik hissəyə qədər çap edin.
printf("%.3lf\n", y);Java Tətbiqi
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner con = new Scanner(System.in);
double x = con.nextDouble();
double y = (2 * x) / Math.sqrt(x * x + 1) - Math.sqrt(x * x + 1) / (x * x * x);
System.out.print(y);
con.close();
}
}Python Tətbiqi
import math
x = float(input())
y = (2 * x) / math.sqrt(x * x + 1) - math.sqrt(x * x + 1) / (x * x * x)
print(y)