Advertisement
qradmanq

dz 4.2

Oct 15th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. void singnX (float x) {
  6. if (x > 0)
  7. cout << "sing" << x << "= 1" << " Число положительно" << endl;
  8. if (x == 0)
  9. cout << "sing" << x << "= 0" << " Число неотрицательно"<< endl;
  10. if (x < 0)
  11. cout << "sing" << x << "= -1" << " Число отрицательно"<< endl; }
  12. int main()
  13. {
  14. setlocale(LC_ALL, "Russian");
  15. int x;
  16. cout << "Введите x";
  17. cin >> x;
  18. singnX(x);
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement