summaryrefslogtreecommitdiff
path: root/1922/CH9/EX9.4.a/9_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '1922/CH9/EX9.4.a/9_4.sce')
-rwxr-xr-x1922/CH9/EX9.4.a/9_4.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1922/CH9/EX9.4.a/9_4.sce b/1922/CH9/EX9.4.a/9_4.sce
new file mode 100755
index 000000000..129fef3bd
--- /dev/null
+++ b/1922/CH9/EX9.4.a/9_4.sce
@@ -0,0 +1,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)