summaryrefslogtreecommitdiff
path: root/3850/CH23/EX23.1/Ex23_1.sce
blob: 2696faf95abfc27ad9bd00b66a9099fada507014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

//To calculate the room temperature in centigrades
 
//example 23.1

clear;

clc;

p0=73;//pressure (in centimeter) at 0 degree celsius

p=77.8;//pressure (in centimeter) at room temperature

p100=100.3;//pressure (in centimeter) at 100 degree celsius

t=(p-p0)/(p100-p0)*100;//formula for finding the room temperature in centigrades

printf("room temperature=%.d degree celsius",t);