Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>;
- #include <iostream>;
- using namespace std;
- int main()
- {
- cout<<"Soprotivlenie"<<endl;
- int r1,r2,rps,q;
- float rpr;
- cout<<"Vvedite soprotivleniya R1 i R2:";
- cin>>r1>>r2;
- cout<<"Parallell'no ili posledavatel'no?(0,1):"<<endl;
- cin>>q;
- rpr=r1*r2/(r1+r2);
- rps=r1+r2;
- if(q==0){
- cout<<"R="<<rpr;
- }
- else{
- cout<<"R="<<rps;
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement