[Cpp]/********************************* Date: * Author: SJF0115 * question: 9 degrees 1166 * Subject: iterative seeking root * Source: http://ac.jobdu.com/problem.php? Pid = 1166 * result: AC * Meaning: * conclusion: * *********************************/# include <stdio. h> # include <stdlib. h> int x; double y (int n) {if (n = 0) return x; return (y (n-1) * 2/3 + x/(3 * y (n-1) * y (n-1);} int main () {int n; while (scanf ("% d", & x, & n )! = EOF) {printf ("%. 6lf \ n ", y (n);} return 0 ;} /********************************** Date: * Author: SJF0115 * question: 9 degrees 1166 * Subject: iterative seeking root * Source: http://ac.jobdu.com/problem.php? Pid = 1166 * result: AC * Meaning: * conclusion: * *********************************/# include <stdio. h> # include <stdlib. h> int x; double y (int n) {if (n = 0) return x; return (y (n-1) * 2/3 + x/(3 * y (n-1) * y (n-1);} int main () {int n; while (scanf ("% d", & x, & n )! = EOF) {printf ("%. 6lf \ n", y (n);} return 0 ;}