Wednesday, February 4, 2015

Math.h header file

 

#include<stdio.h>
#include<math.h>
int main()
{
    double a=sin(1.5);
    printf("%lf\n",sin(1.5));
    printf("%lf\n",cos(1.5));
    printf("%lf\n",tan(1.5));
    //..................
printf("%lf\n",exp(1));
printf("%lf\n",log(1));
printf("%lf\n",log10(100));
printf("%lf\n",pow(4,2));
printf("%lf\n",sqrt(4));
printf("%lf\n",fmod(4.1,5));
//.................
printf("%lf\n",fabs(-4));
printf("%ld\n",labs(-42));
printf("%lf\n",floor(4.6));
printf("%lf\n",ceil(4.2));
 
    return 0;
}

No comments:

Post a Comment