function which is returning double data type

#include<math.h>
double math();
void main(){
    float num;
    num=math();
    clrscr();
    printf("%.lf",num);
    getch();
}
double math(){
    double d=2.1;
    d=ceil(d);
    return d;
}
Output: 3

No comments: