Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i check if the result is fraction

Tags:

.net

vb.net

How can i check if the result of division of two numbers is fraction in visual basic

here is what i need to do :

    Dim x As Integer = 12
    Dim y As Integer = 5

    If TypeOf x/y Is fraction Then
        ( do something )
    End If

Thanks in advance

like image 433
Mina Gabriel Avatar asked Dec 15 '22 20:12

Mina Gabriel


1 Answers

Could you not do the modulus of two numbers and then if that is non zero, it is a fraction?

like image 75
Science_Fiction Avatar answered Feb 07 '23 00:02

Science_Fiction