fork download
  1. #include <stdio.h>
  2. const int min = 100;
  3. const int max = 1000;
  4. int num = 150;
  5. int main() {
  6. printf("Enter a whole number from 100 to 1000: ");
  7.  
  8. scanf("%d", &num);
  9.  
  10. if (num >= min && num <= max) {
  11.  
  12. printf("The number %d is in the range %d - %d\n", num, min, max);
  13. }
  14.  
  15. else {
  16. printf("Number %d is not in the range %d - %d\n", num, min,max);
  17. }
  18.  
  19. printf("Program Complete");
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
Enter a whole number from 100 to 1000: The number 150 is in the range 100 - 1000
Program Complete