Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int age;
  5. printf("Enter your age: \n ");
  6. scanf_s("%d", &age);
  7. if (age < 18)
  8. {
  9. age = 18 - age;
  10. printf("The number of years after which you can vote - %d\n", age);
  11. }
  12. else if (age >= 18)
  13. {
  14. printf("You have the right to vote");
  15. }
  16. else
  17. printf("Incorrect data entered");
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement