blob: 4863d7715b7cd699c5fd4d26bb6d30edbe32c9cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//example 13
// annual lighting cost of a classroom
clear
clc
p=80 //power consumed by fluoroscent lamp in watt
n=30 //no. of lamps used
P=p*n/1000 //lighting power in kW
t=250*12 //operating hours in a year
E=P*t //lighting energy/year
c=E*0.07 //cost of lighting a classroom for a year in dollars
printf("\n Hence,annual energy cost of lighting for the classroom is = %.0f $/year. \n",c);
|