English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

Write the body of ac++ main function that that gets the length and width of a rectangle from the user and computes and writes out the area. Assume that the variables have all been declared.

2007-06-25 02:48:58 · 1 個解答 · 發問者 小胖 1 in 電腦與網際網路 程式設計

1 個解答

寫一個 C++ 的主函式,必須從使用者取得矩形的長度和寬度,然後計算並顯示面積。假定變數皆已宣告。
//Power by Visual Studio 2005
#include
#include
using namespace std;
int main(int argc, char** argv)
{
//==========START==========//
double length,width;
cout<<"Input length= ",cin>>length;
cout<<"Input width= ",cin>>width;
cout<<"The Area of Rectangle= "< //==========END==========//
system("PAUSE");
return EXIT_SUCCESS;
}

2007-06-25 05:04:59 · answer #1 · answered by Big_John-tw 7 · 0 0

fedest.com, questions and answers