#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float x1,y1,x2,y2,xf,h,s;
//clrscr();
printf("enter the
initial points :\n");
scanf("%f%f",&x1,&y1);
printf("enter the
final points :\n");
scanf("%f",&xf);
printf("enter the
step size :\n");
scanf("%f",&h);
printf("X\t\tY\n");
while(x1<=xf)
{
printf("%.2f\t\t%.2f\n",x1,y1);
s=x1*y1;
y2=y1+h*s;
x2=x1+h;
x1=x2;
y1=y2;
}
getch();
}
No comments:
Write comments