Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- float ed(float x, float y){
- y=x-y+2; //insira aqui a função
- return (y);
- }
- float ds(float x, float y){
- y=y-x-1; //insira aqui a função
- return (y);
- }
- int main(){
- float a=0, b=1, m=10, y0=2, h=(b-a/m), x=a, y=y0, yv[m];
- int i;
- for(i=0;i<m;i++){
- y = y+(h*ed(x,y))+h^2/2*ds(x,y);
- yv[i]=y;
- x=a+(i*h);
- }
- printf("%f", yv);
- return 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement