This blog is under construction

Monday 30 April 2012

sinh example in C

Header file:
    math.h

Synopsis:
     double sinh(double x);

Description:
     Returns the hyperbolic sine of x.


sinh function C example:


  #include<stdio.h>
  #include<math.h>
  int main() {
        double x, result;
        printf("Enter your input:");
        scanf("%lf", &x);
        result = sinh(x * 3.14 / 180);
        printf("Hyperbolic sine of %lf is %lf\n", x, result);
        return 0;
  }




  Output:
  jp@jp-VirtualBox:~/cpgms/math$ gcc sinh.c -lm
  jp@jp-VirtualBox:~/cpgms/math$ ./a.out
  Enter your input:90
  Hyperbolic sine of 90.000000 is 2.299302



No comments:

Post a Comment