Advertisement
askarulytarlan

Задача D. Знак числа

Oct 8th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int a;
  10.  
  11. int main(int argc, const char * argv[]) {
  12.  
  13. cin >> a;
  14. if (a == 0 ) {
  15. cout << 0;
  16. }
  17. else if (a > 0){
  18. cout << 1;
  19. }
  20. else {
  21. cout << -1;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement