From 15e9473880e44adc008c0d6751b39da5cd4c3102 Mon Sep 17 00:00:00 2001 From: Igor Dzuro Date: Fri, 20 Mar 2020 10:44:39 +0100 Subject: [PATCH] fix --- a1/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a1/program.c b/a1/program.c index 07f6041..6a1319f 100644 --- a/a1/program.c +++ b/a1/program.c @@ -4,19 +4,19 @@ long double power(long double x, int y); int main() { - double x; - double coef[100]; + float x; + float coef[100]; int coefCount = 0; int retVal; long double result = 0; - if ((retVal = scanf("%lf", &x)) <= 0 || retVal == EOF) { + if ((retVal = scanf("%f", &x)) <= 0 || retVal == EOF) { printf("%s\n", "Chyba: Nespravny vstup"); return 0; } for (int i=0; i<100; i++) { - retVal = scanf("%lf", &coef[coefCount]); + retVal = scanf("%f", &coef[coefCount]); if (coef[i] == 0) { break;