Risonna

lab3_n3

Nov 15th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include "cmath"
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float s;
  8.     s = 0;
  9.     for (float i = 1; i <= 19; i+=3)
  10.     {
  11.         if (((i - 4) * (i - 4)) != 0)
  12.         {
  13.             s = (3 + i) / ((i - 4) * (i - 4));
  14.             cout << "s=" << s << "\n";
  15.         }
  16.         else
  17.         {
  18.             cout << "s divides to 0, impossible to do"<<"\n";
  19.         }
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment