Advertisement
malixds_

homework_2.5

Sep 12th, 2021
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int main() {
  5.     setlocale (LC_ALL, "Russia");
  6.     float x;
  7.     for (x = -4; x <= 4; x += 0.5) {
  8.         if (x == 1) {
  9.             continue;
  10.         }
  11.         float y = (x * x - 2 * x + 2) / (x - 1);
  12.         cout << " " << y;
  13.  
  14.     }
  15.    
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement