您的位置:首页 > 其它

ZOJ 1070 计算电路电压

2010-05-11 10:11 190 查看
//一道物理题,VR=VS*R*C*w/sqrt(R^2*C^2*w^2+1)

#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;

int main()
{
double VS,R,C;
int n,s;
cin>>VS>>R>>C>>n;
double *w=new double[n+1];
s=n;
while(s--)
{
cin>>w[n-s];
cout<<setiosflags(ios::fixed)<<setprecision(3)
<<VS*R*C*w[n-s]/sqrt(R*R*C*C*w[n-s]*w[n-s]+1)<<endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: