A
A
Andrey Rudenko2020-11-13 00:58:56
C++ / C#
Andrey Rudenko, 2020-11-13 00:58:56

What's wrong with the task?

Good evening! I don't understand the meaning of this error.
Problem conditions img-ccVR46.png
x = initial value - 6.2, final value - 8, step - 0.3
i = 1 - 3.28, 2 - 0.56, 3 - 2.91, 4 - 3.26.

One element (i) I replaced with (g) because they are repeated.
Please help, what's wrong?

Task code

#include <stdio.h>
#include <math.h>
#define b 4
main( )
{
    float g[4]={3.28, 0.56, 2.91, 3.26},y,x,a;
    int i;

    for(x=6.2; x<=8; x+=0.3) {
        printf("b=%d\n", b);

        for (i = 0; i < 4; i++)
        {
            y[i]=(exp(a[i])+b*a[i])/(a[i]*log10(x+2));
            printf("Y=%f X(%i)=%f\n", y, i, g[i]);
        }
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-11-13
@Rsa97

log10 ≡ log 10
ln ≡ log e

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question