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