summaryrefslogtreecommitdiff
path: root/1922/CH9/EX9.4.a/9_4.sce
blob: 129fef3bd69501ca240e36d92cb7cf8f830df8be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
//Initialization of variables
G=-30050 //kJ/kmol
R=8.314
T=573 //K
//calculations
lnk=G/(R*T)
k=exp(lnk)
x=poly(0,"x")
vec=roots(4*x^2 - k*(1-x)^2)
x2=vec(2)
//results
printf("Mole fraction of HCN = %.4f",x2)