Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int age;
- printf("Enter your age: \n ");
- scanf_s("%d", &age);
- if (age < 18)
- {
- age = 18 - age;
- printf("The number of years after which you can vote - %d\n", age);
- }
- else if (age >= 18)
- {
- printf("You have the right to vote");
- }
- else
- printf("Incorrect data entered");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement