Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void)
  5.  
  6. {
  7. float e = 2.71828;
  8. int compt,j,k;
  9. float B,H,val,A;
  10. printf(" Insert vaLue of A \n");
  11. scanf("%lf", &A);
  12. printf(" Insert vaLue of B \n");
  13. scanf("%f", &B);
  14. printf(" Insert vaLue of H \n");
  15. scanf("%f", &H);
  16.  
  17. if (( B < A ) || ( H < 0 ))
  18. {
  19. printf(" Incorrect insert. Try again =( ");
  20. }
  21.  
  22. compt = 0;
  23. float Mat[15][2];
  24.  
  25. while (compt<15 && A<B)
  26. {
  27. Mat[compt][0]=A;
  28. val=log(sqrt(pow(e,A-1)));
  29.  
  30.  
  31. Mat[compt][1]=val;
  32. A=A+H;
  33. compt=compt+1;
  34.  
  35. }
  36.  
  37. for (j=0; j<compt; j++)
  38. {
  39. for (k=0; j<2; k++)
  40. {
  41. printf("%f ",Mat[j][k]);
  42. }
  43. printf("\n");
  44. }
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement