// C2_6.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include using namespace std; int main(int argc, char* argv[]) { double r = 0.0 ; // 設定初始值 const double pi =3.1416; const double area = 0.0; cout << endl << "請輸入半徑值 \? "; cin >> r; cout << endl << "圓面積 : "; cout << pi * r * r ; cout << endl; return 0; }