blob: 21f5a3e5b9a08ed367a6a344f7c7920b48407abc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clear
//Given
P=500 //W
V=200.0 //V
V1=240
//Calculation
I=P/V
R=V1-V
R1=R/I
//Result
printf("\n The value of R= %0.3f ohm",R1)
printf("\n Current in a circuit is %0.3f A",I)
|