Posted On: Apr 10, 2020
The algorithm to find the distance between two points is as follows.
#include <bits/stdc++.h> Using namespace STD; // Calculation of the distance float distance(int x1, int y1, int x2, int y2) { // calculating the distance return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2) * 1.0); } // Code of the Drivers int main() { cout << distance(3, 4, 4, 3); return 0; }
Never Miss an Articles from us.
Geographic information system (GIS) is a system planned to capture, amass, maneuver, analyze, administer, and present all types of geographical data. GIS applications are tools that allow users to pro...
A computer shortcut is a set of keys which can be one or more meant to invoke a command in software or an operating system. And to increase one’s efficiency by invoking commands with keyboard ke...
Fossil fuels are a class of hydrocarbon-containing materials present inside Earth’s outer layer that works as the source of energy. Coal, crude oil, and natural gas are the eminent fossil fuels ...