Answer to Question #292197 in Visual Basic for Lam

Question #292197

Write a visual basic code that will display the odd number in a user defined range

1
Expert's answer
2022-02-01T05:56:23-0500
Module Module1




    Sub Main()
        Dim min, max As Integer
        Console.Write("Enter the min number: ")
        min = Integer.Parse(Console.ReadLine())
        Console.Write("Enter the max number: ")
        max = Integer.Parse(Console.ReadLine())


        Console.WriteLine("All odd numbers in a user defined range")
        For i = min To max
            If i Mod 2 <> 0 Then
                Console.WriteLine(i.ToString())
            End If
        Next








        Console.ReadLine()
    End Sub




End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS