summaryrefslogtreecommitdiff
path: root/1427/CH1/EX1.3/1_3.sce
blob: 3019c2abb616cf091ffab0791d9531e281fe54cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//ques-1.3
//Calculating temporary and permanent hardness of a sample of water
clc
A=7.3;//content of Magnesium hydrogencarbonate (in mg/L)
B=16.2;//content of Calcium hydrogencarbonate (in mg/L)
C=9.5;//content of Magnesium chloride (in mg/L)
D=13.6;//content of Calcium sulphate (in mg/L)
a1=(A/146)*100;//CaCO3 equivalent of A
a2=(B/162)*100;//CaCO3 equivalent of B
a3=(C/95)*100;//CaCO3 equivalent of C
a4=(D/136)*100;//CaCO3 equivalent of D
t=a1+a2;//temporary hardness (in ppm)
p=a2+a4;//permanent hardness (in ppm)
printf("Temporary and Permanent hardness of the given sample are %d ppm and %d ppm respectively.",t,p);