Posts

Showing posts from December, 2021

JavaScript Challenge-12

 /*       Write a program to find the Area of a Circle.. */ function CircleArea(rad){       let areaOfCircle = (Math.PI * Math.pow(rad, 2));       console.log(areaOfCircle); } let radius = 7; CircleArea(radius);

JavaScript Challenge- 11

 /* Write a program to find distance between two places.  The Latitude and Longitude of two places will be given. */ function findDistance(curr_lat, curr_long, dest_lat, dest_long){        // Current Latitude & Longitude in Radians..        let lat1_red = curr_lat * (Math.PI/180);        let long1_red = curr_long * (Math.PI/180);        // Current Latitude & Longitude in Radians..        let lat2_red = dest_lat * (Math.PI/180);        let long2_red = dest_long * (Math.PI/180);        // Find Distance..           let dlon = long2_red - long1_red; // Distance bet. two Longitudes..           let dlat = lat2_red - lat1_red; // Distance between two Latitude..           let a = Math.pow(Math.sin(dlat/2), 2)                 ...