Statement of C Program: This Program illustrates the use of abs() , log 10() , pow() and exp() Functions:
Did you check the following? Write a C Program by using sqrt() , sin() , cos() and tan() Functions |
#include<stdio.h>
#include<math.h>
void main()
{
float x , y , xpy , lg , xp ;
int z , az ;
clrscr();
x = 2;
y = 3;
z = -4;
az = abs(z);
lg = log10(x);
xp = exp(y);
xpy = pow(x,y);
printf(" Absolute value of z = %d\n" , az);
printf(" Logarithm of x = %f\n" , lg);
printf(" e to the power y = %f\n" , xp);
printf(" x to the power y = %f\n" , xpy);
}
Output:
Absolute value of z = 4
Logarithm of x = 0.301010
e to the power y = 20.085537
x to the power y = 8
0 Response to "Write a C Program by using abs() , log 10() , pow() and exp() Functions:"
Post a Comment