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