netjunky

no name

Sep 26th, 2010
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. #include <math.h>
  5.  
  6. main() {
  7.     double A,B,H,X,Y;
  8.     printf("Y=ln(sqrt(e^x-1)) tabuleerimine 1. meetodiga\n");
  9.     printf("A=");
  10.     scanf("%lf",&A);
  11.     printf("B=");
  12.     scanf("%lf",&B);
  13.    
  14.     do {
  15.         printf("H (H > 0) = ");
  16.         scanf("%lf",&H);
  17.     } while (H <= 0);
  18.    
  19.     printf("  ARGUMENT  |  Funktsioon\n");
  20.     printf("__________________________\n");
  21.     X = A ;
  22.     Y = log( sqrt( exp( X - 1 ) ) );
  23.    
  24.     while(X == B) {
  25.         printf("%10.4lf  | %10.4lf ",X,Y);
  26.         if(X < B) {
  27.             X = X + H;
  28.         } else {
  29.             X = X - H;
  30.         }
  31.     }
  32. }
Add Comment
Please, Sign In to add comment