Advertisement
anon20016

8

Dec 12th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <vector>
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. double a;
  11. cin >> a;
  12. if (a > -1 && a < 1) {
  13. cout << "f(" << a << ") = " << a * a;
  14. }
  15. else {
  16. cout << "f(" << a << ") = " << 1;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement