[solved]-Write Code Prompt User Accept Latitude Coordinate Followed Longitude Coordinate Floating P Q39029724
Write code that will:
- Prompt the user for, and accept a latitude coordinate followedby a longitude coordinate (as floating point values)
- Print whose “realm” the position is in based on the followingmap:

- c++
this is what I have so far… all my outputs are coming our ashogwarts… can anyone find the problem??
double latitude;
double longitude;
string realm = “”;
cout << “Please enter the latitude of the position: “<< endl;
cout << “Please enter the longitude of the position: “<< endl;
if (realm.find(latitude >= 6.67 && latitude <=13.33)) {
if (realm.find(longitude >= 0 && longitude < 10)){
cout << “The position is in Hogwarts.” << endl;
}
else if (realm.find(longitude > 10 && longitude <=20)){
cout << “The position is in Borg Space.” << endl;
}
else if (realm.find(longitude > 20 && longitude <=30)){
cout << “The position is in Idaho.” << endl;
}
else if (realm.find(latitude >= 0 && latitude <6.67)){
if (realm.find(longitude >= 0 && longitude <=15)){
cout << “The position is in BYU.” << endl;
}
else if (realm.find(longitude > 15 && longitude <=30)){
cout << “The position is in Mordor.” << endl;
}
if(realm.find(realm == “”)){
cout << “The position is in Not Found” << endl;
}
}
}
return 0;
}
Longitude (Degrees East) Hogwarts Borg Space Idaho (Degrees South) Latitude BYU Mordor 13.33 Show transcribed image text Longitude (Degrees East) Hogwarts Borg Space Idaho (Degrees South) Latitude BYU Mordor 13.33
Expert Answer
Answer to Write code that will: Prompt the user for, and accept a latitude coordinate followed by a longitude coordinate (as float… . . .
OR

