Risonna

lab2_n8

Oct 27th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float a;
  8.     cout << "a= "; cin >> a;
  9.     if (a <= 0)
  10.     {
  11.         cout << "∫(a) = " << 0 << "\n";
  12.     }
  13.     if (a > 0)
  14.     {
  15.         if (a > 0 && a <= 1)
  16.         {
  17.             cout << "∫(a) = " << a << "\n";
  18.         }
  19.         else
  20.         {
  21.             cout << "∫(a) = " << a * a * a << "\n";
  22.         }
  23.     }
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment