Initialization
This commit is contained in:
parent
4d2fb827b0
commit
ab1ac589a8
@ -11,11 +11,18 @@ int main() {
|
|||||||
int length = 0;
|
int length = 0;
|
||||||
double result = 0.0;
|
double result = 0.0;
|
||||||
|
|
||||||
while (count < SIZE) {
|
while (count < SIZE)
|
||||||
if (scanf("%d", &input) != 1) {
|
{
|
||||||
printf("Nepodarilo sa nacitat polynom na %d mieste.", count);
|
if (input == '\n')
|
||||||
break;
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (scanf("%d", &input) != 1)
|
||||||
|
{
|
||||||
|
printf("Nepodarilo sa nacitat polynom na %d mieste.", count);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
coefs[count] = input;
|
coefs[count] = input;
|
||||||
count++;
|
count++;
|
||||||
@ -25,7 +32,8 @@ int main() {
|
|||||||
|
|
||||||
length = count;
|
length = count;
|
||||||
|
|
||||||
for (int i = 1; i < length; i ++){
|
for (int i = 1; i < length; i ++)
|
||||||
|
{
|
||||||
result = result * x + coefs[i];
|
result = result * x + coefs[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user