Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(void)
- {
- float e = 2.71828;
- int compt,j,k;
- float B,H,val,A;
- printf(" Insert vaLue of A \n");
- scanf("%lf", &A);
- printf(" Insert vaLue of B \n");
- scanf("%f", &B);
- printf(" Insert vaLue of H \n");
- scanf("%f", &H);
- if (( B < A ) || ( H < 0 ))
- {
- printf(" Incorrect insert. Try again =( ");
- }
- compt = 0;
- float Mat[15][2];
- while (compt<15 && A<B)
- {
- Mat[compt][0]=A;
- val=log(sqrt(pow(e,A-1)));
- Mat[compt][1]=val;
- A=A+H;
- compt=compt+1;
- }
- for (j=0; j<compt; j++)
- {
- for (k=0; j<2; k++)
- {
- printf("%f ",Mat[j][k]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement