ex82135.cpp
来源:互联网 发布:淘宝企业店运营方案 编辑:程序博客网 时间:2024/05/21 19:27
/**************************************************************************
PURPOSE:
BEGIN-TIME: 08/10/25 06:32
FINISH-TIME: 08/10/25 06:55
AUTHOR: ch8_daniel
INPUT: r ------ resistor
OUTPUT: total ------ the total resistor
VERSION: 1.0
**************************************************************************/
#include <iostream>
using namespace std;
int main()
{
float r = 0;
float total = 0;
cout << "Type '0' to quit inputting./n";
while (1)
{
cout << "Enter r: ";
cin >> r;
if (r == 0)
{
break ;
}
total += 1 / r;
}
total = 1 / total;
cout << "Total is : " << total << endl;
return 0;
}
PURPOSE:
BEGIN-TIME: 08/10/25 06:32
FINISH-TIME: 08/10/25 06:55
AUTHOR: ch8_daniel
INPUT: r ------ resistor
OUTPUT: total ------ the total resistor
VERSION: 1.0
**************************************************************************/
#include <iostream>
using namespace std;
int main()
{
float r = 0;
float total = 0;
cout << "Type '0' to quit inputting./n";
while (1)
{
cout << "Enter r: ";
cin >> r;
if (r == 0)
{
break ;
}
total += 1 / r;
}
total = 1 / total;
cout << "Total is : " << total << endl;
return 0;
}
- ex82135.cpp
- cpp
- CPP
- CPP
- cpp
- cpp
- CPP
- CPP
- ClientSockThread.cpp&&ClientUrlThread.cpp
- cpp调用其他cpp
- ex34a.cpp&&ex34aDoc.cpp&&ex34aView.cpp
- MainFrm.cpp&&ServerThread.cpp&&SheetConfig.cpp
- CPP thread
- cpp->html
- CFaderWnd.cpp
- PasswordReminder.cpp
- object.cpp
- CmdTarget.cpp
- 简单入门正则表达式 - 第七章 字符串、行和词边界
- c++
- Google Chrome Source Code 源码下载
- Samsung原版44B0X的Bootloader分析
- ex76122.cpp
- ex82135.cpp
- c++控制结构
- ex83135.cpp
- ex81113.cpp
- 在这里请教一个问题
- ex75122.cpp
- VS2005 SP1安装问题
- ex66104.cpp
- ex65104.cpp