/* 3. C Program to
demonstrate library functions in math.h (at least 5) */
#include<math.h>
void main()
{
clrscr();
printf("Mathematical Functions:\n");
printf("Sin(45)=%f\n",sin(45));
printf("Sqrt(4)=%f\n",sqrt(4));
printf("Power(4,2)=%lf\n",pow(4,2));
printf("Log(5)=%f\n",log(5));
printf("Floor(4.3)=%f\n",floor(4.3));
printf("Ceil(4.2)=%f\n",ceil(4.2));
getch();
}
No comments :
Post a Comment