EmbLogic's Blog

feet function

#include
float fun(float,float);
int main()
{
float a=5.07;
float b=7.11;
float c=fun(a,b);
printf(“%.2f”,c);
return 0;
}
float fun(float x,float y)
{
float sum=x+y;
if(sum>12.12)
{
sum=sum+1.0;
sum=sum-0.12;
}
return sum;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>