Lab Cycle 3: (Area of Circle PI Radius Radius)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

LAB CYCLE 3

1. Write a script that uses a function circleArea()to calculate the area of the circle, and
prints the area of the circle.
(Area of circle = PI*radius*radius)
2. Find the distance between two points. Write a function that will accept the x, y
values of the two points, calculateDistance(x1, y1, x2, y2), and return the distance.

3. Write a program that will accept 5 elements into an array. Pass the entire array and
the number to search into a function,searchElement(arr, n), and return the position
of element in the array.
4 .Add a HTML button to a web page. Using the onClick()event handler have the button, when
clicked, open an alert() box which says "You clicked the button".

5.Create two text fields, one to enter user id and the other to enter password. Use a button to
check whether the two entries match

6.Print the pattern for N rows:

@
@@
@@@
@@@@

You might also like