Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Post New Answer

More Programming Languages AllOther Interview Questions

write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

0 Answers   IBM,


What is the worst case of AVL tree?

1 Answers  


How do you initialize a static member of a class with return value of some function?

0 Answers   Yahoo,


Write a shell program to test whether a given year is leap year or not ?

0 Answers   Patni,


Explain what is OOPS and its concepts?

0 Answers   BirlaSoft,


what is the certificates in biztalk?

0 Answers  


How do i find out the number of parameters passed into function?

0 Answers  


Can we write a method in JSP.If so how?

0 Answers   HCL,


if heap sort contains n elements, no of comparsions required are

2 Answers   Hughes,


What is the purpose of <Trigger> element of <updatePanel> in Ajax

0 Answers  


why applet is introduced?

1 Answers  


if try is followed by finally block what happen to exception occured in try block

3 Answers   Professional Access,


Categories