1 2 3 4 5 6 7 8 9 10 11 12
//Chapter 1, Example 1.3 clc //Initialisation v2=7 //voltage e=12 //emf //Calculation v1=e-v2 //voltage //Results printf("Voltage, V = %.1f V",v1)