clear// //Variables I = 1 //Current (in Ampere) //Calculation //Applying Kirchoff's voltage law: //(1 *3) + (1 * R) + (1 * 4) - 12 =0 R = 5 //Resistance (in ohm) //Result printf("\n Value of R is %0.3f ohm.",R)