//Chapter 1, Example 1.5 clc //Initialisation r1=10 //resistance in ohm r2=20 //resistance in ohm r3=15 //resistance in ohm r4=25 //resistance in ohm //Calculation r=r1+r2+r3+r4 //resistance in ohm //Results printf("Equivalent Resistance, R = %d Ohm",r)