rony-Rony_05

problem 4

Jul 2nd, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int pos_neg(int i);
  4.  
  5. int main()
  6. {
  7.    int number;
  8.  
  9.    printf("Enter an integer : ");
  10.    scanf("%d", &number);
  11.  
  12.    printf("Result : %s",pos_neg(number));
  13.    return 0;
  14. }
  15.  
  16. int pos_neg(int number)
  17. {
  18.   if (number<0){
  19.       return "YOUR NUMBER IS NEGATIVE NUMBER";
  20.    }else{
  21.       return "YOUR NUMBER IS POSITIVE NUMBER";
  22.    }
  23. }
Add Comment
Please, Sign In to add comment