blob: 270e02999bf0c466766fde70676760a6e1fb969e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//Basic Circuit Concepts
//page no-1.13
//example1.7
I1=5/2;
printf("I1=2/5= %2f Ampere", I1)
I2=2;
printf("\nI2=4/8= %2f Ampere", I2)
disp("Potential difference VAB = VA - VB");
disp("Writing KVL equations for path A to B") //Writing KVL equations for path A to B
disp("VA - 2*I1 + 8 - 5*I2 - VB = 0");
disp("VA - VB = (2*2.5) - 8 5 + (5*2)");
VAB=(2*2.5)-8+(5*2)
printf("VAB = %.2f Volt", VAB);
|