blob: b877a91291c2e90d58ee70bf0fb6c0214b7c9f74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
clear;
clc;
// Stoichiometry
// Chapter 2
// Basic Chemical Calculations
// Example 2.21
// Page 27
printf("Example 2.21, Page 29 \n \n");
// solution
//HOCl
Ma = .1 //molarity
Ka = 9.6*10^-7
C = (Ma*Ka)^.5 // conc. of H+ ions
pH = -log10(C)
printf("pH of the sol is "+string(pH)+".")
|