#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float r,l,h;
const float pi=3.1415926f;
cout<<"please enter r,h:";
cin>>r>>h;
l=2*pi*r;
cout<<setiosflags(ios::fixed)<<setiosflags(ios::right)<<setprecision(2);
cout<<1<<endl;
return 0;
}
输出的时候结果是
please enter r,h:1.5 3
1
请按任意键继续. . .
cout<<1<<endl;
->
cout<<l<<endl;
你把字母l写成了数字1