#include <iostream>
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
float r1,r2,r3;
cout<<"Menghitung tahanan total dari rangkaian seri dan paralel"<<endl<<endl;
cout<<"masukkan R1 = "; cin>>r1;
cout<<"masukkan R2 = "; cin>>r2;
cout<<"masukkan R3 = "; cin>>r3;
float rs;
rs=r1+r2+r3;
float rp;
rp=1/r1+1/r2+1/r3;
cout<<"Rangkaian seri = "<<rs<<endl;
cout<<"Rangkaian Paralel = "<<rp<<endl;
return 0;
}
0 komentar:
Posting Komentar