Saturday, 10 December 2011

Write a program to division of small value in c

#include
#include
void main()
{
float a,b;
clrscr();
printf("enter the value a");
scanf("%f",&a);
printf("enter the value b");
scanf("%f",&b);
if (a>b)
printf("%f",a/b);
else
printf("%f",b/a);
getch();
}


OUTPUT
Enter the value a:10
Enter the value b:5
2.0000

No comments:

Post a Comment