Question: 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 "t_fraction" with integer type members
numerator and denominator. (File name: "p15_mod_fraction.f90")
Create the following calculation function of t fraction type in the module.
-Addition functions : frac_plus_frac, frac_plus_int, int_plus_frac
-Subtraction functions : frac_minus_frac, frac_minus_int, int_minus_frac
-Multiplication functions : frac_mult_frac, frac_mult_int, int_mult_frac
-Division functions : frac_divi_frac, frac_divi_int, int_divi_frac
Also define the "interface operator" statement.
Also, create a function "fracset" that sets an integer to a variable of t 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.
 Fortran Programming: Create a module and define a structure "t_fraction" with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!