-
Oct 3rd, 2007, 08:36 PM
#41
Thread Starter
Member
Re: I need a little bit of help. Please look here
:O
uhh... sorry that made noooo sense to me at all.
i have no idea what you just said, sorry im very new
-
Oct 4th, 2007, 08:31 AM
#42
Hyperactive Member
Re: I need a little bit of help. Please look here
Code:
Console.BackgroundColor = ConsoleColor.Green
Console.ForegroundColor = ConsoleColor.DarkRed
Console.Clear()
Console.WriteLine("The Purpose of this program to have the user enter three lengths of sides and determine whether the figure is a triangle or not. Please press Enter to start the Program.")
Console.ReadLine()
Console.BackgroundColor = ConsoleColor.Blue
Console.ForegroundColor = ConsoleColor.Cyan
Console.Clear() 'Clears screen
Console.Beep()
Do
Dim Side1 As Double 'This is the First side of the Triangle.
Dim Side2 As Double 'This is the Second side of the Triangle.
Dim Side3 As Double 'This is the Third side for the Triangle
Dim Triangle As Boolean
Triangle = False
Console.Clear()
Console.WriteLine("Please enter a Value for Side 1")
Side1 = Console.ReadLine
Console.WriteLine("Please enter a Value for Side 2")
Side2 = Console.ReadLine
Console.WriteLine("Please enter a Value for Side 3")
Side3 = Console.ReadLine
Console.ForegroundColor = ConsoleColor.Yellow
If (Side1 + Side2 > Side3) Then
triangle = True
elseif (Side2 + Side3 > Side1) Then
triangle = True
elseif (Side1+Side3>Side2) then
triangle = true
end if
If triangle = true then
Console.WriteLine("Congradulations, That is a Successful Triangle!")
Console.ForegroundColor = ConsoleColor.Red
else
Console.WriteLine("Sorry, That is not a Triangle!")
Console.ForegroundColor = ConsoleColor.Gray
end if
Console.WriteLine("Would you like to try again? Press enter and then Type in 3 lengths to determine if it is a Triangle or not")
Console.ReadLine()
Console.ForegroundColor = ConsoleColor.Cyan
Try the above edited code. The changes i made are VB6 code but i think they stayed the same to vb.net. If not, just substitue whatever if then statements look like now in place of mine.
-Show me on the doll where the music touched you.
-
Oct 4th, 2007, 06:58 PM
#43
Re: I need a little bit of help. Please look here
Originally Posted by fix23
:O
uhh... sorry that made noooo sense to me at all.
i have no idea what you just said, sorry im very new
You have a few years to get used to receiving instructions/requirements in narrative form... don't expect your future boss to write the source code for you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|