Professional Documents
Culture Documents
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
int n,i;
float a,b,y,y1,y2,yf=0,Dx,dx,x;
scanf("%f",&a);
scanf("%f",&b);
printf("\nIntervalos: ");
scanf("%d",&n);
float h[n];
dx=(b-a)/n;
for(i=1;i<n;i++)
{ x=a+i*dx;
h[i]=exp(pow(x,2));
y=y+h[i];
y1=exp(pow(a,2));
y2=exp(pow(b,2));
yf=((y1+y2+2*y)*dx)/2;
getch();