Commit 67c088c2 by glkink

Add new file

parent 3adb8783
Showing with 22 additions and 0 deletions
#include <stdio.h>
#include <stdio.h>
int main(void)
{
float x, sum, d;
int i;
printf("Sisesta arv: ");
scanf("%f", &x);
sum = 0;
d = x;
for (i = 1; i <= 21; d = (d * x / i++))
{
if ((i % 2) == 1)
{
sum = sum + d;
d = -d;
}
}
printf("%0.3f ", sum);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment