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
how to convert the data from HTML file to SAS dataset?
Do not use more than 3 nested IF. Use Evaluate statement in case of more IF required. Please give a detail explantion besides readability and clarity for Evaluate stmt.
code for connection from windows forms to sql server
What is the difference between save and create method of activerecord?
difference between mantis and other tools?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
Find out the list of roles which gives access to GUI activities? thanks in advance
i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared
write a program on c(or)c++(or)java language i.e if i have 5 numbers like (10,24,3,9,15) i want to display highest number from these numbers
Which language they use during interview?
0 Answers State Bank Of India SBI,
what is difference between scripts, smartforms and adobe forms
Why did you ever become involved in QA/testing?