₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,293 members, 8,449,603 topics. Date: Wednesday, 22 July 2026 at 06:13 AM

Toggle theme

Pls Help Out ( Visual Basic ) - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPls Help Out ( Visual Basic ) (778 Views)

1 Reply

Pls Help Out ( Visual Basic ) by Talk2bryant(op): 5:03pm On Nov 18, 2013
was given a quiz in class earlier today, the question goes thus :
create a simple program which will determine if any random number is even or odd?


i just started vb days ago and have been trying to use the if-else statement and have not been getting.... pls gurus in the house help a bro out
Re: Pls Help Out ( Visual Basic ) by jboy01(m): 6:38am On Nov 19, 2013
Talk2bryant: was given a quiz in class earlier today, the question goes thus :
create a simple program which will determine if any random number is even or odd?


i just started vb days ago and have been trying to use the if-else statement and have not been getting.... pls gurus in the house help a bro out
Here is my one cent.

Private sub randomTest()
Dim randomInt as integer
Dim rnd as new system.random()
randomInt = rnd.Next(0, 100) 'generate randon from 0 to 99
If(randomInt % 2 > 0) then
System.writeln(" The ganerated value is an odd number"wink

Else
System.writeln("the generated value is an even number"wink
End if
End sub
1 Reply

Visual Basic 2008 Express EditionCan I Call Myself A Good Programmer If I Only Know Visual BasicAny Visual Basic (VB) Guru In The House?234

Help Needed ASAPIf Microsoft Went Open Source With Its Os ...Watch Free Video Tutorials on how to build Websites with Wordpress