Post Reply 
How to print out chemical equation
02-07-2017, 02:32 PM (This post was last modified: 02-07-2017 02:40 PM by mop80087.)
Post: #1
How to print out chemical equation
Hi All,

I'd like to make a simple program to my prime for a chemical equation, but i don't find
the best way to print out the formula of the image:

[Image: untitled-jpg--391]
https://uploaddeimagens.com.br/imagens/u...d-jpg--391

m and n are var's and n1, n2, n3, n4 are solutions...
What is your best option to print out a chemical equation?

Cumprimentos/Sincères salutations/Cordiali saluti/
Best regards/Mit freundlichen Grüßen/Saludos
Diamantino Valente
Portugal
Find all posts by this user
Quote this message in a reply
02-07-2017, 02:46 PM
Post: #2
RE: How to print out chemical equation
I only need your suggestion so that it looks, graphically, with a chemical equation when print out.

Whith TEXTOUT_P() or PRINT() or other...
Find all posts by this user
Quote this message in a reply
02-07-2017, 03:51 PM (This post was last modified: 02-07-2017 03:52 PM by compsystems.)
Post: #3
RE: How to print out chemical equation
print("CmHn+n₃(O₂+3.76N₂) → n₁CO₂+n₂H₂0+n₃N₂"); [enter] But makes a line adjustment =( The terminal view does not have a horizontal scroll
Find all posts by this user
Quote this message in a reply
02-08-2017, 08:59 AM
Post: #4
RE: How to print out chemical equation
(02-07-2017 03:51 PM)compsystems Wrote:  print("CmHn+n₃(O₂+3.76N₂) → n₁CO₂+n₂H₂0+n₃N₂"); [enter] But makes a line adjustment =( The terminal view does not have a horizontal scroll

Compsystems, thanks for the reply...
...but what I'm trying to look for it's print friendly chemical equation
Find all posts by this user
Quote this message in a reply
02-08-2017, 11:55 AM
Post: #5
RE: How to print out chemical equation
Working on...
PHP Code:
EXPORT COMBUSTAO()
BEGIN

LOCAL M
,N,R;
LOCAL n1,n2,n3,n4;
LOCAL n5,n6,n7,n8;
PRINT;
INPUT({{M,[0],{35,30,2}},{N,[0],{35,30,3}},{R,[0],{35,30,4}}},"COMBUSTÃO",{"Carbono =","Hidrogénio =","Rendimento ="},{"Introduza Nº Átomos Carbono","Introduza Nº Átomos Hidrogénio","Introduza Rendimento"});
   
   
n1:=ROUND(M,3);
   
n2:=ROUND(N/2,3);
   
n4:=ROUND(M+(N/4),3);
   
n3:=ROUND((3.76*n4)/2,3);

   
n5:=ROUND((1+(R/100))*(M+(N/4)),3);
   
n6:=ROUND((3.76*n4)/2,3);
   
n7:=ROUND((R/100)*n4,3);

   
n8:=ROUND(n5*(2*3.76*14+2*16)/((12*M)+(1*N)),3);
   
PRINT(
"");
PRINT(
"Equação teorica:");
PRINT(
"C"+M+"H"+" + "+n4+"(O2+3.76N2) ->");
PRINT(
"                  "+n1+"CO2 + "+n2+"H20 + "+n3+"N2");
PRINT(
"");
PRINT(
"");
PRINT(
"Com rendimento= "+R+"%");
PRINT(
"Equação real:");
PRINT(
"C"+M+"H"+" + "+n5+"(O2+3.76N2) ->");
PRINT(
"                  "+n1+"CO2 + "+n2+"H20 + "+n6+"N2 + "+n7+"O2");
PRINT(
"");
PRINT(
"Relação Ar-Combustivel");
PRINT(
"(AC) "+n8+"="+n5+"*(2*3.76*14+2*16)/((12*"+M+")+(1*"+N+"))");

WAIT(-1);

END
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)