1 2 3 4 5 6
//Chapter 2, Problem 3 clc; V=20; //Potential difference I=0.8; //Current in ampere R=V/I; //Calculating resistance using Ohm's law printf("Resistance = %d ohms",R);