Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   I need help trying to create a program? (https://www.askmehelpdesk.com/showthread.php?t=807562)

  • Jan 27, 2015, 01:53 PM
    Latimeradam
    I need help trying to create a program?
    Hi

    I am new to programming and I am struggling trying to create this program using the if solutions here is what I want to create
    Produce a program that would calculate the perimeter of the triangle, the area of the triangle and the height of the triangle from the length of the three sides of a triangle. If the three lengths of the sides of the triangle do not define a valid triangle then the user must be notified of this and no calculation will be performed upon this data.


    Required maths formula

    Heron’s formula:

    Area of triangle = SQRT(s(s-a)(s-b)(s-c))
    where a, b, c are the three sides, s = (a + b + c)/2 and c is the base of the triangle

    Height of the triangle = (Area of triangle)*2/c

    Perimeter of triangle = a + b + c

    Triangle types:

    Scalene – all sides unequal
    Isosceles – two sides only equal
    Equilateral – all sides equal
    Right Angled – one angle of 90 degrees
  • Jan 27, 2015, 03:23 PM
    CravenMorhead
    How is the triangle inputed into your program?
  • Jan 28, 2015, 04:32 AM
    Latimeradam
    visual basic C#
  • Jan 28, 2015, 05:58 AM
    ScottGem
    Either you are using VB or C# not both.

    This appears to be a homework assignment. We won't do your work for you. Show us your code or the code not working and we will try to help.
  • Jan 28, 2015, 08:31 AM
    CravenMorhead
    I didn't ask what your tools were, I asked how they're being read in.
  • Jan 29, 2015, 12:29 PM
    Latimeradam
    I have got the codes but it seems to working in form not in console how could I convert it to console.

  • All times are GMT -7. The time now is 10:20 PM.