1 2 3 4 5 6 7 8 9 10 11 12
clear //Initialization e=12 //EMF source in volt v1=3 //node voltage v3=3 //node voltage //Calculation v2=v1+v3-e //node voltage //Results printf("\n V2 = %d V",v2)