This commit is contained in:
Igor Dzuro 2020-03-20 10:44:39 +01:00
parent 08d40d2f1e
commit 15e9473880

View File

@ -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;