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