Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------------------------------------------------------------------------------------
- // Exercise 6
- // ----------
- //
- // General : The program will get the details about the nominee and tell if he fits for the job or not.
- //
- // Input : Age and height of the nominee.
- //
- // Process : The program check if the nominee fits for the job according to the company standarts.
- //
- // Output : Prints weather the nominee fits for the job or not.
- //
- //------------------------------------------------------------------------------------------------------------------------------
- // Programmer: Ohad Ozcohen
- // Date: 9.9.2016
- //------------------------------------------------------------------------------------------------------------------------------
- #include <stdio.h>
- void main(void)
- {
- int age;
- int height;
- printf("Please enter your age: ");
- scanf_s("%d", &age);
- printf("Please enter your height: ");
- scanf_s("%d", &height);
- if ((age >= 20 && age <= 40) || (age>=30 && age<=50 && height>180))
- {
- printf("Accepted");
- }
- else
- {
- printf("Not accepted");
- }
- }
Add Comment
Please, Sign In to add comment