Math function example [Inbuilt]

//Prog:Example of Math Function

#include<math.h>

#include<stdio.h>
#include<conio.h>
void main()
{
int a=10;
float b=2.3;
printf("Log10:%f\n",log10(a));

printf("ceil 2.3:%f\n",ceil(b));
printf("floor 2.3:%f\n",floor(b));

printf("abs:%d\n",abs(a));
a=-1;
printf("abs:%d\n",abs(a));

a=90;
printf("tan:%f\n",tan(a));
printf("cos:%f\n",cos(a));
printf("sin:%f\n",sin(a));

printf("pow:%f\n",pow(4,2));

printf("exp(0)):%f\n",exp(0));
printf("exp(1)):%f\n",exp(1));

printf("sqrt:%f\n",sqrt(16));

b=-45.66;
printf("fabs:%f\n",fabs(b));
}


Above example shows how you can perform Maths(inbuilt) functions !

2 comments:

  1. Excellent incredible blog layout! How long have you been blogging for? you make running a blog look easy. The overall glance of your website is magnificent, let alone the content! math typing

    ReplyDelete
    Replies
    1. Thanks Elbert, Thanks for the encouragement, Sorry for late reply but now working actively on this

      Delete