blob: ab8dd2c3d991dc52b3802e3990480e0fdf555d90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc
clear
//INPUT
t1=273;//temperature of the source in K
t2=290;//temperature of the sink in K
l=8*10^11;//latent of fusion in ergs/cal
//CALCULATIONS
n=(t2-t1)/t1;//efficiency of the engine
w=n*l;//energy to be supplied in ergs
//OUTPUT
mprintf('efficiency of the engine is %3.2f \n energy to be supplied is %3.2f ergs',n,w)
|