The programmer blog

This is my personal blog. Im a programmer.i would like to share programs as well as my personal memories through this blog... dedicted to all my friends

Thursday, January 29, 2009

BASIC PROGRAMS

/* PROGRAM TO DIVIDE 2 NUMBERS */

/*PROGRAM BY: GAGZ*/




void main()
{
float x,y,result;
clrscr();
printf('\n enter x and y:");
scanf("%f%f",&x,&y);
if(y!=0)
{
result=x/y;
printf("\n the result is %f ",result);
}
else
{
printf("\n MATH ERROR");
exit();
}
getch();
}

Labels:

0 Comments:

Post a Comment

<< Home

Spread Firefox Affiliate Button