Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fortran Programming: Create a module and define a structure t _ fraction with integer type members numerator and denominator. ( File name: p
Fortran Programming: Create a module and define a structure tfraction" with integer type members
numerator and denominator. File name: pmodfraction.f
Create the following calculation function of fraction type in the module.
Addition functions : fracplusfrac, fracplusint, intplusfrac
Subtraction functions : fracminusfrac, fracminusint, intminusfrac
Multiplication functions : fracmultfrac, fracmultint, intmultfrac
Division functions : fracdivifrac, fracdiviint, intdivifrac
Also define the "interface operator" statement.
Also, create a function "fracset" that sets an integer to a variable of fraction type,
and a subroutine "dispfrac" to display.
In addition, add a subroutine "euclidean" that performs Eucledean algorithm, and use
it in each function as necessary.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started