Advertisement
valve2

0 or positive ? negative

Mar 20th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | Software | 0 0
  1. // 0 or positive ? negative
  2. #include <stdio.h>
  3.  
  4. int main() {
  5.     int num;
  6.     scanf_s("%d", &num);
  7.     printf("%d is %s", num, num >= 0 ? "num is 0 or positive" : "num is negative");
  8.     return 0;
  9.  
  10.  
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement