SHARE
TWEET

Untitled

a guest Sep 15th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int age;
  5.     printf("Enter your age: \n ");
  6.     scanf_s("%d", &age);
  7.     if (age >= 18 && age < 100) {
  8.         printf("You have the right to vote");
  9.     }
  10.     else if (age < 18 && age > 0) {
  11.         age = 18 - age;
  12.         printf("The number of years after which you can vote - %d\n", age);
  13.     }
  14.     else {
  15.         printf(" Incorrect data entered ");
  16.     }
  17.     return 0;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top