Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by nizovi_memorija ( 4 years ago )
#include <stdio.h>
#include <stdlib.h>
int main() {
double a, b, c, *x;
int n, i;
printf("Unesite koeficijente a, b i c: ");
scanf("%lf %lf %lf", &a, &b, &c);
do {
printf("Unesite n: ");
scanf("%d", &n);
} while (n <= 0 || n > 100);
x = malloc(sizeof(double) * n);
printf("Unesite vrijednosti x: ");
for (i = 0; i < n; i++) {
scanf("%lf", &x[i]);
}
for (i = 0; i < n; i++) {
printf("y[%d]=%g\n", i, a * x[i] * x[i] + b * x[i] + c);
}
exit(0);
}
Revise this Paste