////C++ Primer Plus -- Chapter 3--3
#include <iostream>
using namespace std;
const int sec_to_min=60;
const int min_to_deg=60;
int main ()
{
	double degrees,minutes,seconds;
	cout<<"Enter a latitude in degrees,minutes,and seconds:\n";
	cout<<"First,enter the degrees:";
	cin>>degrees;
	cout<<"Next,enter the minutes of arc:";
	cin>>minutes;
	cout<<"Finally,enter the seconds of arc:";
	cin>>seconds;
	double total_deg=degrees+minutes/min_to_deg+seconds/(min_to_deg*sec_to_min);
	cout<<degrees<<" degrees,"<<minutes<<" minutes,"<<seconds<<" seconds ="<<total_deg<<"degree\n";
	return 0;

}