Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main()
- {
- int r1, r2, spoj, serijski, paralelni;
- cout<<"Unesite vrijednost R1:";
- cin>>r1;
- cout<<"Unesite vrijednost R2"<<endl;
- cin>>r2;
- cout<<"Serijski Spoj=1"<<endl;
- cout<<"Paralelni Spoj=2"<<endl;
- cout<<"Odaberite spoj:"<<endl;
- cin>>spoj;
- if(spoj=1)
- {
- serijski=r1+r2;
- cout<<"Ru="<<serijski<<endl;
- }
- else(spoj=2);
- {
- paralelni=(r1*r2)/(r1+r2);
- cout<<"Ru="<<paralelni<<endl;
- }
- system("PAUSE");
- return EXIT_SUCCESS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement