English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

read the lenghts of three sides of triangle (s1,s2,s3) and determine what type of triangle it is,based on the following cases. let A denote the largest of s1,s2,s3 and B and C the other two. Then:
if A >= B+C no triangle is formed
if A^2 = B^2+C^2 A right-angled triangle is formed
if A^2 > B^2+C^2 An obstuse triangle is formed
if A^2 < B^2+C^2 An acute triangle is formed

2006-09-11 17:48:20 · 2 answers · asked by sthefany f 2 in Computers & Internet Programming & Design

2 answers

If you asked how to do it with Javascript rather than VBScipt, you might get more responses. UNfortunately, I am limited to basic MQ commands in VBScript.

But it should be real simply - just create an object, pass it the 3 INT's (or floats if you really want), set the return value based on the formulae you've given & return a string describing the triangle - QED.

I could do it in COBOL, PL/1 or Java, if it's any use. Might even be able to do something in Assembler, REXX of CLIST even.

2006-09-11 17:58:52 · answer #1 · answered by dryheatdave 6 · 0 0

Damn i took a VB class like 3 yrs ago. So Im no help.... :(

2006-09-11 17:51:45 · answer #2 · answered by nerdboy 4 · 0 0

fedest.com, questions and answers