// 14-1
#include <stdio.h>
double ssk_wa;
double ssk_sa;
double ssk_seki;
double ssk_shou;
int sisoku(double a, double b)
{
if (b == 0) {
return -1; // ゼロ除算
}
ssk_wa = a + b;
ssk_sa = a - b;
ssk_seki = a * b;
ssk_shou = a / b;
return 0;
}
int main()
{
double a, b;
if (sisoku(a, b)) {
return 1;
}
printf("和:%f, 差:%f, 積:%f, 商:%f\n", ssk_wa
, ssk_sa
, ssk_seki
, ssk_shou
); return 0;
}
Ly8gMTQtMQojaW5jbHVkZSA8c3RkaW8uaD4KCmRvdWJsZSBzc2tfd2E7CmRvdWJsZSBzc2tfc2E7CmRvdWJsZSBzc2tfc2VraTsKZG91YmxlIHNza19zaG91OwoKaW50IHNpc29rdShkb3VibGUgYSwgZG91YmxlIGIpCnsKICAgIGlmIChiID09IDApIHsKICAgICAgICByZXR1cm4gLTE7IC8vIOOCvOODremZpOeulwogICAgfQogICAgc3NrX3dhID0gYSArIGI7CiAgICBzc2tfc2EgPSBhIC0gYjsKICAgIHNza19zZWtpID0gYSAqIGI7CiAgICBzc2tfc2hvdSA9IGEgLyBiOwogICAgcmV0dXJuIDA7Cn0KCmludCBtYWluKCkKewogICAgZG91YmxlIGEsIGI7CiAgICBwcmludGYoIuWkieaVsGHjga7lgKTjgpLlhaXliptcbiIpO3NjYW5mKCIlbGYiLCAmYSk7CiAgICBwcmludGYoIuWkieaVsGLjga7lgKTjgpLlhaXliptcbiIpO3NjYW5mKCIlbGYiLCAmYik7CiAgICBwcmludGYoImE9JWYsIGI9JWZcbiIsIGEsIGIpOwogICAgaWYgKHNpc29rdShhLCBiKSkgewogICAgICAgIHByaW50ZigiRXJyb3LvvJrjgrzjg63pmaTnrpdcbiIpOwogICAgICAgIHJldHVybiAxOwogICAgfQogICAgcHJpbnRmKCLlkozvvJolZiwg5beu77yaJWYsIOepje+8miVmLCDllYbvvJolZlxuIiwgc3NrX3dhLCBzc2tfc2EsIHNza19zZWtpLCBzc2tfc2hvdSk7CiAgICByZXR1cm4gMDsKfQ==