#include "pch.h"
#include<iostream>
using namespace std;
const float PI = 3.1415926;
int main() {
int iType;
float readius, a, b;
while (true){
cout << "图形的类型为?(1-圆形 2-长方形 3-正方形)";
cin >> iType;
switch (iType) {
case :
cout << "请输入圆形的直径";
cin >> readius;
cout << "圆的面积为" << readius * PI << "平方厘米" << endl;
break;
case :
cout << "矩形的长为:";
cin >>a;
cout << "矩形的宽位";
cin >> b;
cout << "矩形的面积为:" << a * b << "平方厘米" << endl;
break;
case :
cout << "请输入正方形的边长";
cin >> a;
cout << "正方形面积为" << a * a << "平方厘米" << endl;
}
}
}