fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3.  
  4. void main()
  5. {
  6.  
  7. float x,y;
  8. printf("Enter the value of x:> ");
  9. scanf("%f",&x);
  10. y=floor(x);
  11. printf("\nfloor of %f=%f\n",x,y);
  12. y=ceil(x);
  13. printf("\nceiling of %f=%f\n",x,y);
  14. y=fabs(x);
  15. printf("\nAbsolute value of %f=%f\n",x,y);
  16. y=log(x);
  17. printf("\nloge(%f)=%f\n",x,y);
  18. y=log10(x);
  19. printf("\nlog10(%f)=%f\n",x,y);
  20. y=exp(x);
  21. printf("\ne^%f=%f\n",x,y);
  22. y=sqrt(x);
  23. printf("\nsquare root of %f=%f\n",x,y);
  24. y=sin(x);
  25. printf("\nsine of %f=%f\n",x,y);
  26. y=cos(x);
  27. printf("\ncosine of %f=%f\n",x,y);
  28. y=tan(x);
  29. printf("\ntangent of %f=%f\n",x,y);
  30. y=1/sin(x);
  31. printf("\ncosecant of %f=%f\n",x,y);
  32.  
  33.  
  34. }
  35.  
  36.  
Runtime error #stdin #stdout 0s 2172KB
stdin
Standard input is empty
stdout
Enter the value of x:> 
floor of 15809318486016.000000=15809318486016.000000

ceiling of 15809318486016.000000=15809318486016.000000

Absolute value of 15809318486016.000000=15809318486016.000000

loge(15809318486016.000000)=30.391621

log10(15809318486016.000000)=13.198914

e^15809318486016.000000=inf

square root of 15809318486016.000000=3976093.369882

sine of 15809318486016.000000=-0.158964

cosine of 15809318486016.000000=-0.987284

tangent of 15809318486016.000000=0.161011

cosecant of 15809318486016.000000=-6.290745