Page 2 of 2 FirstFirst 12
Results 41 to 43 of 43

Thread: I need a little bit of help. Please look here

  1. #41

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    58

    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

  2. #42
    Hyperactive Member Ambivalentiowa's Avatar
    Join Date
    Apr 2002
    Location
    Coming soon to a store near you!
    Posts
    375

    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.

  3. #43
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: I need a little bit of help. Please look here

    Quote 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.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width