Percentage of an element in a compund. Input total molar mass of each element.
e.g. O2 Has a mass of 32 g/mol.
-- CompNum --
:Input "NUMBER 2-5:",N
:Disp "ELEMENT"
:If N=5
:Then
:Prompt A,B,C,D,E
:A+B+C+D+E→X
:Disp 100(A/X),100(B/X),100(C/X),100(D/X),100(E/X)
:End
:If N=4
:Then
:Prompt A,B,C,D
:A+B+C+D→X
:Disp 100(A/X),100(B/X),100(C/X),100(D/X)
:End
:If N=3
:Then
:Prompt A,B,C
:A+B+C→X
:Disp 100(A/X),100(B/X),100(C/X)
:End
:If N=2
:Then
:Prompt A,B
:A+B→X
:Disp 100(A/X),100(B/X)
:End
No comments:
Post a Comment