pvjc26/du1/program.c
2026-03-04 13:59:14 +01:00

21 lines
517 B
C

#include <stdio.h>
int main(){
double x, a, b, c, y;
if (scanf("%lf", &x) != 1 && x != 0){
printf("Nepodarilo sa načítať x");
return 0;
} else if (scanf("%lf", &a) != 1 && a != 0){
printf("Nepodarilo sa načítať a");
return 0;
} else if(scanf("%lf", &b) != 1 && b != 0){
printf("Nepodarilo sa načítať b");
return 0;
} else if(scanf("%lf", &c) != 1 && c != 0){
printf("Nepodarilo sa načítať c");
return 0;
}
y = x*x*a+b*x+c;
printf("Vysledok je: %.2f\n", y);
return 0;
}