1:
#include <stdio.h>
#include <math.h>
int main(int argc, char* argv[]) {
float c = 25.0, w, v, b, a, y;
printf("Введите w: ");
scanf("%f", &w);
printf("Введите v: ");
scanf("%f", &v);
b = w / v;
a = pow(w - 20.0, 1.0 / 3.0) / (1.0 - v + b / 13.0);
y = a + b + c;
printf("Ответ: %f\n", y);
}
2:
#include <stdio.h>
#include <math.h>
int main(int argc, char* argv[]) {
float x, e, a, result, approx = 1.0, fact = 1.0, xlna, xlnan;
int n = 1;
printf("Введите a: ");
scanf("%f", &a);
printf("Введите x: ");
scanf("%f", &x);
printf("Введите epsilon: ");
scanf("%f", &e);
result = pow(a, x);
xlna = x * log(a);
xlnan = xlna;
do {
approx += xlnan / fact;
xlnan *= xlna;
fact *= ++n;
} while (fabs(result - approx) >= e);
printf("a^x = %f, approx = %f, n = %d\n", result, approx, n - 1);
}
3.
#include <stdio.h>
#include <math.h>
int main(int argc, char* argv[]) {
float e = 0.001;
float z = 0.0;
float i2, sub, subb, result = 0.0;
int i, j;
for (i = 1; i <= 8; i++) {
i2 = pow(i, 2);
sub = 0.0;
j = 1;
do {
subb = 4.5 / pow(i * j, 3);
sub += subb;
j++;
} while (subb >= e);
result += i2 * sub;
}
printf("Сумма: %f\n", result);
}