$\begin{cases} y^{'}=f(x,y)\\ y(x_{0})=y_{0} \end{cases}$

$\begin{cases} y_{i+1}=y_{i}+hK_{1}\\ K_{1}=f(x_{i},y_{i}) \end{cases}$

$\begin{cases} y_{i+1}=y_{i}+\frac{h}{2}(K_{1}+K_{2})\\ K_{1}=f(x_{i},y_{i})\\ K_{2}=f(x_{i+1},y_{i}+hK_{1}) \end{cases}$

$\begin{cases} K_{1}=f(x,y)\\ K_{2}=f(x_{i+\frac{1}{2}},y_{i}+\frac{h}{2}K_{1})\\ K_{3}=f(x_{i+\frac{1}{2}},y_{i}+\frac{h}{2}K_{2})\\ K_{4}=f(x_{i+1},y_{i}+hK_{3})\\ y_{i+1}=y_{i}+\frac{h}{6}(K_{1}+2K_{2}+2K_{3}+K_{4}) \end{cases}$

#include"stdio.h"
#include"stdlib.h"
void fun1(double a,double b,double h)
{  double x,y=0,i,k1,k2,k3,k4;
for(i=1;i<=((b-a)/h)+1;i++)
{ x=i*h;
k1=h*(1-y);
k2=h*(1-(y+1/2.0*k1));
k3=h*(1-(y+1/2.0*k2));
k4=h*(1-(y+k3));
y=y+1/6.0*(k1+2*k2+2*k3+k4);
}
printf("%lf\n",y);
}

void fun2(double a,double b,double h)
{  double x,y=1,i,k1,k2,k3,k4;
for(i=0;i<=((b-a)/h);i++)
{ x=i*h;
k1=h*(x*y*y);
k2=h*((x+h/2)*(y+1/2.0*k1)*(y+1/2.0*k1));
k3=h*((x+h/2)*(y+1/2.0*k2)*(y+1/2.0*k2));
k4=h*((x+h)*(y+k3)*(y+k3));
y=y+1/6.0*(k1+2*k2+2*k3+k4);
}
printf("%lf\n",y);
}

int main()
{double a=0,b=1,h=0.1;
fun1(a,b,h);
fun2(a,b,h);
}