How to error check that input is int or something else
Hi, here is my problem. I have to make a program that determines the distance between 2 points of latitude and longitude. I've done all that, but I'm having a problem with the error checking. The first location is supposed to be enter with a space between the latitude and longitude (34 151). A negative in front of the number denotes south or west for latitude and longitude. So if i enter (34 abc), it thinks that abc is a number and calculates something and i get a non-garbage output. How would I put an error checking feature into my program so it would says that "abc" is a bad input?
thanks!