// C6_10.cpp : Defines the entry point for the console application. // 患癹ㄧ计 #include "stdafx.h" #include #include // exit() ㄧΑㄏノ using namespace std; double Times(double x, int n); // ㄧ计 int main(int argc, char* argv[]) { int p = 3; double x = 3.0; // 跑计﹍ double y = 0.0; cout << "璸衡蛮弘絋Ωよ" << endl; cout << "叫块计 (Double int) :" ; cin >> x >> p ; y = Times(x, p); // ㊣ㄧ计 cout << endl << x << "  " << p << " Ωよ = " << y; cout << endl << x << " " << p << "Ωよ = " << Times(x, p); // 块肚 x = Times(x, Times(3.0, 2.0)); // ノㄧ计把计 cout << endl << "x = " << x; cout << endl; return 0; } // ㄧ计砞﹚ double Times(double x, int n) { if(n<0) // 耞 n  { cout << endl << "把计璽, 祘Α挡."; exit(1); } if(n) return x*Times(x, n-1); else return 1.0; }