How to get an input from a potential user of our code

I did manage to do it workable, only – even thought that the second part of the sentences which should be written on the screen is red and there is no errors – I cannot see it on the computer screen. Well, I will work on it when I learn how to do it.

       Dim userName As String = Nothing
       Dim userBook As Integer = Nothing
       Dim userTime As Double = Nothing
       Console.WriteLine("What is your name?")
       userName = Console.ReadLine()
       Console.WriteLine("How many books do you read per month?")
       userBook = Console.ReadLine()
       Console.WriteLine("How much time a day do you spend chatting on skype?")
       userTime = Console.ReadLine()
       Console.Write("Your name is: " & userName)
       Console.Write(" You read: " & userBook &  " books per month.")
       Console.Write("  You spend: " & userTime & " hours chatting on skype daily.")
       Console.WriteLine()
       Console.ReadLine()

There is very easy trick to get the second part of a literal string visible, we have to repeat the sign 'AND', and that is all.

0 comments:

About this blog


Pages

Powered by Blogger.

Popular Posts

About Me

Blogger templates

Blogroll

Blog Archive

Blogger templates

Blogger news