提交时间:2024-10-07 19:18:55
运行 ID: 52506
#include <iostream> using namespace std; int main() { int dividend, divisor; cin >> dividend >> divisor; if (divisor == 0) { cout << "Error: Division by zero is undefined." << endl; return 1; } int quotient = dividend / divisor; int remainder = dividend % divisor; cout << quotient << " " << remainder << endl; return 0; }