int main() {
int x, y;
cin >> x >> y;
cout << x << "/" << y << "=" << x / y << endl;
cout << x << "%" << y << "=" << x % y << endl;
}
整除先按绝对值计算,然后加上符号;取余的结果= 被除数 - 除数*商
int main() {
int x, y;
cin >> x >> y;
cout << x << "/" << y << "=" << x / y << endl;
cout << x << "%" << y << "=" << x % y << endl;
}
整除先按绝对值计算,然后加上符号;取余的结果= 被除数 - 除数*商