初学c语言的时候用tc2.0 做的一个小程序
/*****************************************************/
/*Title:LM317 voltage calculator */
/*Address:Foshan City, Guangdong Province */
/*NDesigner:yangxiufeng */
/*Time:2010-5-24 */
/*****************************************************/
#include<iostream>
using namespace std;
int main()
{
float R,r;
float Vout;
cout<<"请输入电阻R1、R2的值:"<<endl;
cout<<"R1(Ω)=";
cin>>R;
cout<<"R2=(Ω)";
cin>>r;
Vout=1.25*(1+r/R);
cout<<"LM317的输出电压为Vout:"<<Vout<<"V"<<endl;
return 0;
}


