ohad

Untitled

Sep 8th, 2016
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //------------------------------------------------------------------------------------------------------------------------------
  2. //                                                                  Exercise 6
  3. //                                                                  ----------
  4. //
  5. // General : The program will get the details about the nominee and tell if he fits for the job or not.
  6. //
  7. // Input   : Age and height of the nominee.
  8. //
  9. // Process : The program check if the nominee fits for the job according to the company standarts.
  10. //
  11. // Output  : Prints weather the nominee fits for the job or not.
  12. //
  13. //------------------------------------------------------------------------------------------------------------------------------
  14. // Programmer: Ohad Ozcohen
  15. // Date: 9.9.2016
  16. //------------------------------------------------------------------------------------------------------------------------------
  17.  
  18. #include <stdio.h>
  19. void main(void)
  20. {
  21.     int age;
  22.     int height;
  23.     printf("Please enter your age: ");
  24.     scanf_s("%d", &age);
  25.     printf("Please enter your height: ");
  26.     scanf_s("%d", &height);
  27.     if ((age >= 20 && age <= 40) || (age>=30 && age<=50 && height>180))
  28.     {
  29.         printf("Accepted");
  30.     }
  31.     else
  32.     {
  33.         printf("Not accepted");
  34.     }
  35. }
Add Comment
Please, Sign In to add comment