usingMaths.com
Demonstrating and showing pupils and students one application of Mathematics.







<< Previous Next >>

Code for Dividing Fractions in Visual Basic (VB.Net)



Method of Dividing Fractions

Division is the inverse operation of multiplication; That is exactly what we'll do with for fractions.
Invert the fractions that come after a division sign, as well change the division sign to multiplication, and then follow through with multiplication.


Algorithm Steps to Divide Fractions in VB.Net

Say we are to simplify
                  21/8 ÷ 7/2;

Inverting this will yield
                  21/8 ÷ 7/2;

Then we can go ahead and multiply.


Create a new class file; Project, Add Class.
Call it DivideFraction.vb.
Optionally, create a new module file; Project, Add Module.
Call it DivideFractionModule.vb.
Type out the adjoining Visual Basic (VB.Net) codes for dividing fractions.


Note: You can instead comment out the VB.Net code in the main module from the previous lesson or simply continue from where it stopped.


So!

Feel free to try out your own set of numerators and denominators for fractional division.









<< Previous Next >>