summaryrefslogtreecommitdiff
path: root/1427/CH5/EX5.21/5_21.sce
blob: 34f374a7d7769b14852322ff03c3d72f4b9b34d6 (plain)
1
2
3
4
5
6
7
8
//ques-5.21
//Calculating pH of given NaOH solution
clc
M=10^-8;//molarity of NaOH
D=M^2+4*(10^-14);//discriminant
x=(-M+sqrt(D))/2;//content of hydrogen ion
p=-log10(x);
printf("pH of given NaOH sample is %.2f.",p);