#include <stdio.h>
Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
◆ main()
| int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 3 of file Ejemplo010.c.
4{
5 int i, n, s;
7 do{
8 printf("Ingrese el numero de terminos: ");
9 scanf("%d", &n);
10 }while(n<1);
11 printf("Ingrese el valor de x: ");
12 scanf("%f", &x);
13 for(i=0,
fct=x, sx=0; i<n; i++)
14 {
15 s = 1-2*(i%2);
17 fct *= (x/(2*i+2))*(x/(2*i+3));
18 }
19 printf("sin(%f) = %f\n", x, sx);
20 return 0;
21}
double fct(double x, int n)