1 2 3 4 5 6
//Chapter 2, Problem 4 clc; R=2*10^3; //Resistance in ohms I=10*10^-3; //Current in ampere V=R*I; //Calculating voltage printf("Potential difference = %d V",V);