Advertisement
AndreyKlipikov

Prog. Lab 2. N23

Nov 2nd, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <cmath>
  3.  
  4. int main() {
  5.     printf("Avtor – Klipikov A.V., student gr. PIbd-11\n");
  6.     printf("Variant N 23\n");
  7.     printf("Programma vvodit znachenie argumenta x i vichislaet znachenie func Y\n");
  8.     printf("    | 1 / ln(x * x * x)  x > 4.5\n");
  9.     printf("Y = | 2 * x + 0.1        0 <= x <= 4.5\n");
  10.     printf("    | 3                  x < 0\n");
  11.     printf("vvedite x = ");
  12.    
  13.     double x = 0, y = 0;
  14.     scanf("%lf", &x);
  15.     y = x > 4.5 ? 1 / log(x * x * x) : x >= 0 ? 2 * x + 0.1 : 3;
  16.     printf("Y = %lf", y);
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement