SHARE
TWEET

Untitled

anon20016 Dec 7th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     #define _CRT_SECURE_NO_WARNINGS
  2.  
  3.     #include <iostream>
  4.     using namespace std;
  5.  
  6.     int main() {
  7.         setlocale(LC_ALL, "Russian");
  8.  
  9.         // AND == &&
  10.         // OR == ||
  11.         // == !=
  12.         float pi = acos(0) * 2;
  13.  
  14.         for (double i = -0.5; i <= 2; i = i + 0.25) {
  15.             float x = i;
  16.             if (x < 0) {
  17.                 printf("y(%f) = %f\n", x, x * x + 1);
  18.             }
  19.             if (x >= 0 && x <= pi / 2) {
  20.                 printf("y(%f) = %f\n", x, sin(x));
  21.             }
  22.             if (x > pi / 2) {
  23.                 printf("y(%f) = %f\n", x, x - 2.1);
  24.             }
  25.         }
  26.  
  27.  
  28.         return 0;
  29.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top