9 lines
156 B
C
9 lines
156 B
C
#include <math.h>
|
|
|
|
double work(int n) {
|
|
double x = 0.0;
|
|
for (int i = 0; i < n; i++) {
|
|
x += sin((double)i) * cos((double)i * 0.5);
|
|
}
|
|
return x;
|
|
}
|