BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/index.php)
-   Visual Programming (http://bzupages.com/forumdisplay.php?f=237)
-   -   Assignmnet#2.2; Identify given number odd/even using VB Console Application (http://bzupages.com/showthread.php?t=6113)

.BZU. 11-10-2009 09:26 PM

Assignmnet#2.2; Identify given number odd/even using VB Console Application
 
Assignmnet#2.2; Identify given number odd/even using VB Console Application
Code:

Module table
    Sub Main()
        Dim number As String
        Dim  cinnumber, answer As Integer
        number = Console.ReadLine()
        cinnumber = number
        answer = cinnumber Mod 2
        If answer = 0 Then
            Console.WriteLine("even ")
        Else
            Console.WriteLine("odd")
        End If

        Console.WriteLine("Press Enter to Close this window")
        number = Console.Read()
    End Sub
    'This Table program copied from bzupages
End Module



All times are GMT +5. The time now is 07:35 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.