大家看一下这里哪里错了
#include<iostream> using namespace std;
const float PI=3.1416; void mian() { int iType; float radius,a,b,area;
cout<<"图形的类型?(1-圆形 2-长方形 3-正方形):"; cin>>iType; switch(iType) { case 1: cout<<"圆的半径为:"; cin>>radius; area=PI*radius; cout<<"面积为:"<<area<<endl; break; case 2: cout<<"矩形的长为:"; cin>>a; cout<<"矩形的宽为:"; cin>>b; area=a*b; cout<<"面积为:"<<area<<endl; break; case 3: cout<<"正方形的边长为:"; cin>>a; area=a*a; cout<<"面积为:"<<area<<endl; break; default: cout<<"不是合法的输入值!"<<endl; } }