source code :
program ResistorParalel;
var
R1, R2, R3, Rtotal: real;
begin
{ Input nilai resistor }
write('Masukkan nilai resistor R1 (ohm): '); readln(R1);
write('Masukkan nilai resistor R2 (ohm): '); readln(R2);
write('Masukkan nilai resistor R3 (ohm): '); readln(R3);
{ Menghitung resistansi total pada rangkaian paralel }
Rtotal := 1 / (1/R1 + 1/R2 + 1/R3);
{ Menampilkan hasil }
writeln('Resistansi total (paralel) adalah: ', Rtotal:0:2, ' ohm');
end.
#smb stikom muhammadiyah batam
31 окт 2024