发布网友 发布时间:2022-04-29 17:39
共1个回答
热心网友 时间:2023-10-24 21:07
#include <stdio.h>
double fun ( float h )
{ return (long)( h * 100 + 0.5 )/ 100.0;
}main( )
{
float a;
printf ("Enter a: "); scanf ( "%f", &a );
printf ( "The original data is : " );
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
}
热心网友 时间:2023-10-24 21:07
#include <stdio.h>
double fun ( float h )
{ return (long)( h * 100 + 0.5 )/ 100.0;
}main( )
{
float a;
printf ("Enter a: "); scanf ( "%f", &a );
printf ( "The original data is : " );
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
}
热心网友 时间:2023-10-24 21:07
#include <stdio.h>
double fun ( float h )
{ return (long)( h * 100 + 0.5 )/ 100.0;
}main( )
{
float a;
printf ("Enter a: "); scanf ( "%f", &a );
printf ( "The original data is : " );
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
}
热心网友 时间:2023-10-24 21:07
#include <stdio.h>
double fun ( float h )
{ return (long)( h * 100 + 0.5 )/ 100.0;
}main( )
{
float a;
printf ("Enter a: "); scanf ( "%f", &a );
printf ( "The original data is : " );
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
}
热心网友 时间:2023-10-24 21:07
#include <stdio.h>
double fun ( float h )
{ return (long)( h * 100 + 0.5 )/ 100.0;
}main( )
{
float a;
printf ("Enter a: "); scanf ( "%f", &a );
printf ( "The original data is : " );
printf ( "%f \n\n", a );
printf ( "The result : %f\n", fun ( a ) );
}