25 lines
410 B
C
25 lines
410 B
C
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
double a, b, c, D;
|
|
|
|
printf("a: ");
|
|
scanf("%lf", &a);
|
|
printf("b: ");
|
|
scanf("%lf", &b);
|
|
printf("c: ");
|
|
scanf("%lf", &c);
|
|
|
|
D = b * b - 4 * a * c;
|
|
|
|
if (D == 0.0) {
|
|
puts("Superposition");
|
|
} else if (D < 0.0) {
|
|
puts("Two complex answers");
|
|
} else if (D > 0.0) {
|
|
puts("Two real answers");
|
|
}
|
|
|
|
return 0;
|
|
}
|