標題:
面積計算 (一) - 矩形
[打印本頁]
作者:
tonyh
時間:
2014-8-23 11:59
標題:
面積計算 (一) - 矩形
本帖最後由 tonyh 於 2014-8-23 12:01 編輯
[attach]952[/attach]
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int x,y;
cout<<"請輸入矩形的長(公分): ";
cin>>x;
cout<<"請輸入矩形的寬(公分): ";
cin>>y;
cout<<"長"<<x<<"公分,寬"<<y<<"公分的矩形,周長為"<<(x+y)*2
<<",面積為"<<x*y<<"平方公分."<<endl;
system("pause");
return 0;
}
複製代碼
作者:
梁和雋
時間:
2014-8-23 11:59
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int x;
int y;
cout<<"請輸入寬"<<endl;
cin>>x;
cout<<"請輸入長"<<endl;
cin>>y;
cout<<"周長為: "<<2*(x+y)<<endl;
cout<<"面積為: "<<x*y<<endl;
system("pause");
return 0;
}
複製代碼
作者:
洪振庭
時間:
2014-8-23 12:10
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int x,y;
cout<<"請輸入矩形的長(cm):";
cin>>x;
cout<<"請輸入矩形的寬(cm):";
cin>>y;
cout<<"長"<<x<<"cm,寬"<<y<<"公分的矩形,周長為"<<(x+y)*2<<",面積為"<<x*y<<"平方公分"<<endl;
system("pause");
return 0;
}
複製代碼
作者:
李大全
時間:
2014-8-23 12:10
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int x,y;
cout<<"請輸入矩形的長(公分): ";
cin>>x;
cout<<"請輸入矩形的寬(公分): ";
cin>>y;
cout<<"長"<<x<<"公分,寬"<<y<<"公分的矩形,周長為"<<(x+y)*2
<<",面積為"<<x*y<<"平方公分."<<endl;
system("pause");
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
system("pause");
return 0;
}
複製代碼
作者:
謝瀞儀
時間:
2014-8-23 12:14
本帖最後由 謝瀞儀 於 2014-8-23 12:17 編輯
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
float x,y;
cout<<"rectengle long(cm):";
cin>>x;
cout<<"rectengle height(cm):";
cin>>y;
cout<<"long"<<x<<"cm";
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"height"<<y<<"cm's rectengle";
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"矩形周長="<<2*(x+y)<<","<<"\a"<<"\n";
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
cout<<"面積="<<x*y<<"cm2"<<"\n";
cout<<"\a"<<"\n";
system("pause");
cout<<"\a"<<"\n";
system("pause");
return 0;
}
複製代碼
作者:
李知易
時間:
2014-8-23 12:25
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
float x,y;
cout<<"請輸入矩形的長(公分):";
cin>>x;
cout<<"請輸入矩形的寬(公分):";
cin>>y;
cout<<"長為"<< x << "公分,寬為"<< y <<"公分的矩形,周長為"<<(x+y)*2<<",面積為"<<x*y<<"平方公分‧"<<endl;
system ("pause");
return 0;
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/)
Powered by Discuz! 7.2