0% found this document useful (0 votes)
41 views2 pages

FORTRAN

The document discusses a syllabus for a General Chemistry chapter on Microsoft Fortran. The syllabus covers basic computer components, languages, and Microsoft Fortran concepts like constants, variables, operators, arithmetic expressions, input/output statements, and conditional statements. It also lists 5 applications of solving chemical problems using Fortran, including calculating roots of a quadratic equation. A sample Fortran program is provided to calculate the real roots of a quadratic equation by taking coefficients as input and using formulas to determine the roots.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

FORTRAN

The document discusses a syllabus for a General Chemistry chapter on Microsoft Fortran. The syllabus covers basic computer components, languages, and Microsoft Fortran concepts like constants, variables, operators, arithmetic expressions, input/output statements, and conditional statements. It also lists 5 applications of solving chemical problems using Fortran, including calculating roots of a quadratic equation. A sample Fortran program is provided to calculate the real roots of a quadratic equation by taking coefficients as input and using formulas to determine the roots.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

M.

sc (Organic chemistry)
1st Year
Subject: General Chemistry
Chapter-5
Microsoft Fortran

SYLLABUS:

1) Basic components of Computers,


2) Higher and lower level languages,
3) Microsoft Fortran:
a) constants,
b) variables and operators,
c) arithmetic expressions,
d) assignment and replacement statements,
4) Input and Output statements –
a) Format free and Format directed I/O statements – Iw, Fw.d, Ew.d and Gw.d format
specifications,
b) conditional and unconditional statements – Logical IF,
c) Block IF and Go To statements,
d) Do statement – syntax and rules.
Application of Chemical Problems:
Flowcharts and Programs for
1. Statistical Analysis calculation of arithmetic mean,mean deviation, variance and standard deviation
of replicate measurements.
2. Solution of Quadratic equation – calculation of the roots of a quadratic equation.
3. Calculation of the pH and hydrogen ion concentration of an aqueous solution of a strong acid
taking into account the auto ionization of water.
4. Calculation of the root of a polynomial using Gauss-Newton method – Application to Vander-
Waal’s equation.
5. Calculation of the rate constant of a first order reaction or calculation of molar extinction
coefficient using Beer-Lambert’s Law by Linear leastsquares method.

2. Solution of Quadratic equation – calculation of the roots of a quadratic equation.


Flow chart:
start
input
D squrt(b*b-4*a*c)
X1 (-b+D)/2a
X2 C (-b-D)/2a

Print x1,Cx2

stop

Fortran code:

PROGRAM quadratic roots


IMPLICIT NONE

!declaring variables

REAL::a,b,c,d,root1,root2,val

PRINT *, '============================================'
PRINT *, 'PROGRAM TO CALCULATE ROOTS OF A QUADRATIC EQUATION [REAL ROOTS ONLY] [ BY WWW.BOTTOMSCIENCE.COM ]'
PRINT *, '============================================'

PRINT *,'Please enter the value of cofficients a, b, and c respectively as per the equation - ax^2 + bx + c'

READ(*,*)a,b,c

!calculating the square root part -> square root(b^2-4ac)

val=((b**2)-(4*a*c))

d=SQRT(val)

root1=(-b+d)/(2*a)
root2=(-b-d)/(2*a)

PRINT *,'Calculated real roots are - root 1 = ',root1 ,'root 2 = ', root2

END PROGRAM

OUTPUT

OUTPUT – QUADRATIC EQUATION [REAL ROOTS ONLY]

You might also like