/*
*copyright (c)2014,烟台大学计算机学院
*All rights reserved.
*文件名称:test.cpp
*作 者:于凯
*完成日期:2014年10月9日
*版 本 号:v1.0
*
*问题描述:
*输入描述:
*程序输出:
*/
#include <iostream>
using namespace std;
int main()
{
double R1,R2,R ;
cout << "请分别输入两个电阻的阻值:" << endl ;
cin >> R1 >> R2 ;
R = 1 / ( 1 / R1 + 1 / R2) ;
cout << "并联的电阻值是" << R << "Ω" << endl ;
return 0;
}
运行结果: