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
what is meaning of MDM in sap?let me know that meaning
What is a must for multitasking? a) Process preemption b) Paging c) Virtual memory d) None of the above
You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
Wats the name of the first os
How to use string functions in QTP?give some examples
smal talk is pure object oriented or not?
Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?
how to data grid use in data bind?
How to link calculator in oops concept? how is it working in oops concept? why dont u using in beginning of program 'z' in abap(sap)?
hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...
What are events in smartforms?
Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.