16 lines
346 B
C
16 lines
346 B
C
|
#include <math.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(void) {
|
||
|
|
||
|
// initialize variables
|
||
|
double a, b, c, d;
|
||
|
scanf("%lf %lf %lf %lf", &a, &b, &c, &d);
|
||
|
|
||
|
// trinary expression magic. same as above
|
||
|
(b * c - d < 1e-6 && b * c - d > -1e-6) ? printf("error")
|
||
|
: printf("%.1lf", a / (b * c - d));
|
||
|
|
||
|
return 0;
|
||
|
}
|