Can Someone tell me what is wrong with this?

June 24, 2009 at 00:57:02
Specs: VB.Net
Module Module1
Sub Main()
' psuedo-code as comments.
Dim write As String
write = ("Enter FirstName: ")
Console.Write("Enter FirstName: ")
' Input FirstName
firstName: Console.ReadLine()
write = ("Enter MiddleInitial: ")
Console.Write("Enter MiddleIntial: ")
' Input MiddleInitial
middleIntial: Console.ReadLine()
write = ("Enter LastName: ")
Console.Write("Enter LastName: ")
' Input LastName
lastName: Console.ReadLine()
'Set FirstName = middleInitial = lastName
Dim firstName = "middleInitial" = "lastName"
' Write "The Person's Full name is: " & FirstName - MiddleInitial "." - LastName
Console.WriteLine("The Person's Full Name is: " & firstName & "MiddleInitial" & "." & "LastName")
End Sub
End Module

See More: Can Someone tell me what is wrong with this?

Report •


#1
June 26, 2009 at 17:14:50
Just looking at it, I'd say your problem is that you never do anything with the user input.

Also...

Dim firstName = "middleInitial" = "lastName"
On this line, you declare firstName to be a variant, in which holds the result of an equality comparison between the string "middleInitial" and "lastName", which will always be False.

Report •
Related Solutions


Ask Question