练习专区

今天的一小步就是明天的一大步
Problem 1168 二分法求f(x)=e^x-6的根
Accepted: 5   Total Submit: 10
Time Limit: 1000ms   Memory Limit: 30720KB
Description
用二分法求f(x)=e^x-6=0的根。精确度ε取0.001。e取2.718282
Input
先输入一个正整数T,表示接下来有T行。每行二个double型的数a,b,表示要找的区间[a,b]
Output
如果在[a,b]内找不到根就输出"Can't find it.".否则输出"x=x0",x0为所找的根.
Sample Input
2
-5 0
0 3
Sample Output
Can't find it.
x=1.79
Hint
提交     返回