Initialization

This commit is contained in:
Kozar 2024-03-04 19:57:08 +01:00
parent 4d2fb827b0
commit ab1ac589a8

View File

@ -11,11 +11,18 @@ int main() {
int length = 0;
double result = 0.0;
while (count < SIZE) {
if (scanf("%d", &input) != 1) {
printf("Nepodarilo sa nacitat polynom na %d mieste.", count);
break;
while (count < SIZE)
{
if (input == '\n')
{
continue;
}
if (scanf("%d", &input) != 1)
{
printf("Nepodarilo sa nacitat polynom na %d mieste.", count);
return 0;
}
coefs[count] = input;
count++;
@ -25,7 +32,8 @@ int main() {
length = count;
for (int i = 1; i < length; i ++){
for (int i = 1; i < length; i ++)
{
result = result * x + coefs[i];
}