Home  |  IT Zone  |  Tips / Tricks  |  Did You Know  |  Inspirational  |  Health  |  World Infos  |  Insurance  |  Universities  |  Forex  |  Mathematics  |  Illusions  |  Children Day Quotes  |  Fun / Jokes  |  Decent Quotes  |  Birthday Msgs  |  Good Morning Msgs  |  Good Night Msg  |  Husband Wife Jokes  |  Teacher Students Jokes  |  Insult Jokes  |  Love Quotes  |  Sad Quotes  |  Funny Pics  |  Be Aware  |  Articles  |  Simple Joys of Life 

To input the sides of triangle and to check whether a triangle can be formed or not.

To input the sides of triangle and to check whether a triangle can be formed or not. (Qbasic Code)
CLS
top:
INPUT "Enter the length of the first side of triangle"; a
INPUT "Enter the length of the second side of triangle"; b
INPUT "Enter the length of the third side of triangle"; c
IF a + b > c AND b + c > a AND c + a > b THEN
    PRINT "Triangle can be formed"
ELSE
    PRINT "Triangle can not be formed"
END IF
PRINT
INPUT "Do you want to check more (Y/N)?"; ans$
IF UCASE$(ans$) = "Y" THEN
    GOTO top:
ELSE
    SYSTEM
END IF
END


Share :

Twitter
Back To Top

facebook main

Powered by Blogger.