Control Structure
In the previous blog we discussed if else control structure now we will some example programs.
Module Example6
Sub main()
Dim Num As Integer
Console.Write("Enter a number greater than 0 or less than 0 : ")
Num = Console.ReadLine
If Num > 0 Then
Console.WriteLine(" Positive Number ")
Else
Console.WriteLine(" Negative Number ")
End If
Console.ReadKey()
End Sub
End Module
The above program check whether the given number is positive or negative. Positive number is one which is greater than 0. Negative number is one which is less than 0. Using above program we can find out given number is Positive or Negative.
but zero is natural number
ReplyDeleteIT IS JUST FOR EXAMPLE
ReplyDeletecon you give this same answers for visual basic 6
ReplyDeleteNice post. Thanks,A strong search engine optimization campaign can improve your company's search engine ranking position (SERP) in major search engines which allows potential customers looking for the services you offer to find you. Having a website can help people learn more about you, but it is useless for marketing unless visitors are being driven to it. While there are many ways to drive new users to your homepage, search engines are among the best at bringing new visitors to your door.
ReplyDelete
ReplyDeleteIf you’re looking for or you’re in search of where to get Bollywood movies, application, and games.
http://www.kikguru.com/likewap-download-free-mp3-songs-games/