fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int num;
  5. printf("Enter a number");
  6. scanf("%d",&num);
  7.  
  8. if(num<0){
  9. ("number is negative");
  10. }else{
  11. printf("number is positive");
  12.  
  13. }
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
Enter a numbernumber is positive