#include <iostream>
#include <math.h>
using namespace std;
int main() {
double lat1, lon1, lat2, lon2, x, y;
cout << "请输入纬度1(单位:度):" << endl;
cin >> lat1;
cout << "请输入经度1(单位:度):" << endl;
cin >> lon1;
cout << "请输入纬度2(单位:分):" << endl;
cin >> lat2;
cout << "请输入经度2(单位:分):" << endl;
cin >> lon2;
char arr[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','I','S','T','U','V'};
x = (lat1 + 5) / 6;
y = (lon1 + 5) / 6;
int z = arr[x];
cout << "1:100万图幅编号" << z << "—— " << y << endl;
return 0;
}
有三个错误:表达式必须具有整数或未区分范围的枚举类型,是用未初始化的内存“z”和小标不是整型