Write a program which inputs 2 integers representing the
sides of a triangle, a
and b. Next, write a function which accepts the 2 sides as
parameters and
returns the hypotenuse of the triangle, c.
Use
c
2
= a
2
+ b
2
To raise a number to an exponent, us
e the built
-
in JavaScript function
Math.pow()
Let’s say you have a variable x and you want to raise it to
the 5
th
power, use
Math.pow in the following manner...
Math.pow(
x,
5
);
This will raise x to the 5
th
power.
To find the square root of a number, use t
he built
-
in JavaScript function
Math.sqrt
()
So to find the square root of x, use Math.pow
()
in the following manner...
Math.sqrt(
x
)
You must create 2 functions to
receive
credit for this assignment. Your
‘
main
’
function which is called from the button. And your
hypotenuse function.
Again, the main function calls upon the hypotenuse f
unction when it needs that
value. Get the user
’
s input, call the function, output your result.
Create your own CSS layout
No Answer is Posted For this Question
Be the First to Post Answer
the channel in the data communication model can be? option a.postal mail serv. b telephon lines c.radio signals d. all the above
2 Answers iNautix, National Investment Commission,
What is meant byStatic Variable ?
Binary tree?
how will you code the subfile which is in editing mode (multiple case subfile)?
Which tag is used to create table row
How to use string functions in QTP?give some examples
plz send me NIC Scientific Officer /Engineer-SB(Programmer) previous question paper or syllabus
What are data structures?
WHat is execution in manual testing and when will we start execution and what language we use in execution
needs examples for black box testing and white box testing
Plz sent me in .net 2.0 interview Question & answers?
what is meant by life cycle of a business