blob: 85c9d3db5a9d50340aaae67167c13349a273e04b (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Scilab code Ex1.8: Pg 14 (2008)
clc; clear;
V = 24; // Potential difference,V
R = 15; // Resistance, ohms
// From Ohm's law, V = I*R, then solving for I
I = V/R; // Electric current, A
printf("\nThe current flowing through the resistor = %3.1f A", I)
// Result
// The current flowing through the resistor = 1.6 A
|