#include< stdio.h;
// #include< math.h;
int main() {
int I = 0;
double value[8];
for(I = 0; I < ;8; i++){
printf(“Enter value at index %d: “; (i +1 ));
Please note, always use %lf and not %f when reading double data from the user. double is %lf, while float is %f. That is the difference.
In this problem, we use two headers, stdio.h and math.h. The math.h defines a lot of mathematical functions. It returns double as a result since all functions in this library takes double as an argument.
The stdio.h header defines 3 variable types, namely size_t, FILE, and fpos_t.