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: cprograms
0 Comments:
Post a Comment
<< Home