Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <math.h>
  4.  
  5. double f(double x)
  6. {
  7.     return sqrt(2*x+1);
  8. }
  9.  
  10. int main()
  11. {
  12.     double a,b,I;
  13.     printf("Введите значение а: ");
  14.     scanf("%lf",&a);
  15.     printf("Введите значение b: ");
  16.     scanf("%lf",&b);
  17.     I=(b-a)/b*(f(a)+4*f((b+a)/b)+f(b));
  18.     printf("I= %lf",I);
  19.     getch();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement