#include <iostream>
using namespace std;

double divide(double dividend, double divisor)
{
    if (divisor == 0) throw "0で割ることはできません";
    return dividend / divisor;
}

int main()
{
    double n1, n2;
    cout << "数1÷数2の計算を行います" << endl;
    cout << "数1と数2を入力してください" << endl;
    cin >> n1 >> n2;
    try {
        double result = divide(n1, n2);
        cout << "計算結果=" << result << endl;
    }
    catch (const char* error) {
        cerr << error << endl;
    }
}
