I have trouble putting this program below into a switch statement at the next program under "case 3" Im new at C++ so its difficult to see the problem. I only get error everytime and its getting really on my nerves. Anyone who knows what to do?
The first one her is a program who will calculate the distance between two geographical points on the Earth's but i need to get it under case 3 instead in the program after this one.
# include <iostream>
# include <cstdio>
# include <cmath>
double getdistance(double x1,double y1,double x2,double y2)
radius=6371; // radius km
// X og Y coord
if (x1==x2 && y1==y2)
cout<<"Write the coords you like to calculate distance from: \n";
cout<<"distance in km : \n";
This is the program i want to put it to under "case 3"