New Problem arrised in c++
Posted: Wed Nov 24, 2004 5:50 pm
#include<stdio.h>
void main()
{
float n,a;
while(scanf("%f%f",&n,&a)==2)
{
printf("%f",n*a);
}
}
When I give n=100.00 , a=43.12 as input it
then gives 4311.999893 as results
When I give n=100.00 , a=43.123 as input it
then gives 4312.300110 as results
So I am not getting the actual result.
But How can I get it?
void main()
{
float n,a;
while(scanf("%f%f",&n,&a)==2)
{
printf("%f",n*a);
}
}
When I give n=100.00 , a=43.12 as input it
then gives 4311.999893 as results
When I give n=100.00 , a=43.123 as input it
then gives 4312.300110 as results
So I am not getting the actual result.
But How can I get it?