#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
◆ asen()
| float asen |
( |
float | x, |
|
|
int | n ) |
Definition at line 29 of file Ejemplo033.c.
30{
31 int i;
33 for(i=0, asx=0,
fct=x; i<n; i++)
34 {
36 fct*=((2*i+1)*x*x/(2*i+3));
37 fct*=((2*i+1.0)/(2*(i+1)));
38 }
39 return asx;
40}
double fct(double x, int n)
◆ main()
| int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 42 of file Ejemplo033.c.
43{
44 int n=0;
45 float x=-1, asx;
46 if(argc==3)
47 x = atof(argv[2]);
48 if(argc&2)
49 n = atoi(argv[1]);
53 printf("asen(%f) = %f\n", x, asx);
54 return 0;
55}
float asen(float x, int n)
float validar2(float a, float min, float max, char *str)
◆ validar()
| float validar |
( |
float | min, |
|
|
float | max, |
|
|
char * | str ) |
Definition at line 18 of file Ejemplo033.c.
19{
20 float a;
21 printf("Ingrese el valor de %s: ", str);
22 scanf("%f", &a);
24 return a;
25 else
27}
float validar(float min, float max, char *str)
◆ validar2()
| float validar2 |
( |
float | a, |
|
|
float | min, |
|
|
float | max, |
|
|
char * | str ) |
Definition at line 6 of file Ejemplo033.c.
7{
9 return a;
10 printf("Ingrese el valor de %s: ", str);
11 scanf("%f", &a);
13 return a;
14 else
16}