1 2 3 4 5 6 7
//Chapter 2, Problem 13 clc; V=240; //voltage R=960; //resistance I=V/R; //calculating current using Ohms law P=V*I; //calculating power printf("Power rating P = %d W",P);