#include<iostream>
int main()
{
using namespace std;
const int rate = 60;
cout << "Enter a latitude in degrees, minutes, and seconds:" << endl;
cout << "First, enter the degrees:"
float degree,minute,second;
cin >> degree;
cout << "Next, enter the minutes of arc:";
cin >> minute;
cout << "Finally, enter the seconds of arc:";
cin >> seconds;
cout << degree << " degrees, " << minute << " minutes, "
<< second << " seconds = " <<
degree + mintue / rate + second / rate / rate
<< " degrees" << endl;
return 0;
}
Exercise 3.3
最新推荐文章于 2020-11-20 23:20:01 发布