0 дауыс
448 көрілді

F(x)={ xcosx, если x<1.22;

            5x3+7, если x>1.22;

осы есепке блок схема құрып программасын жазу керек 

көмектесіңіздерші өтініш

1 жауап

0 дауыс
#include <stdio.h>
#include <math.h>

float fx(float x) {
    float result;
    if (x < 1.22) {
        result = x * cos(x);
    } else if (x >= 1.22) {
        result = 5 * pow(x, 3) + 7;
    }
    return result;
}

int main() {
    printf("%f", fx(2.0));
    return 0;
}
...