blob: 73903f1d694b0b4202987b3eb8edcf431dcc7f54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clear//
//Variables
V = 7 * 2 //Voltage : 7 div * (2 V/div) (in volts)
I = 5 * 5 * 10**-3 //Current : 5 div * (5 * 10**-3) (in Ampere)
//Calculation
R = V/I //Resistance (in ohm)
//Result
printf("\n The value of resistance is %0.3f ohm.",R)
|