Error in c proggame

Closed
ilyas - Jul 22, 2010 at 11:19 AM
sriggg Posts 5 Registration date Tuesday July 13, 2010 Status Member Last seen December 18, 2010 - Jul 31, 2010 at 09:11 AM
plz remove error from this proggrame.proggrme have no output.


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd = DETECT, gm;
int dx, dy, p, end;
float x1, x2, y1, y2, x, y;
initgraph(&gd, &gm, "c:\tc\bgi");
printf("Enter Value of X1: ");
scanf("%f", &x1);
printf("Enter Value of Y1: ");
scanf("%f", &y1);
printf("Enter Value of X2: ");
scanf("%f", &x2);
printf("Enter Value of Y2: ");
scanf("%f", &y2);
dx = abs(x1 - x2);
dy = abs(y1 - y2);
p = 2 * dy - dx;
if(x1 > x2)
{
x = x2;
y = y2;
end = x1;
}
else
{
x = x1;
y = y1;
end = x2;
}
putpixel(x, y, 10);
while(x < end)
{
x = x + 1;
if(p < 0)
{

1 response

sriggg Posts 5 Registration date Tuesday July 13, 2010 Status Member Last seen December 18, 2010 5
Jul 31, 2010 at 09:11 AM
send the total program dude..........
0