Friday, 5 February 2016

Right program of goto keyword

int main()
{
   int age;
   

   printf("Enter you age:");
   scanf("%d", &age);
   if(age>=18)
        goto Vote;
   else
        goto NoVote;
Vote:
     printf("you are eligible for voting");
     exit();
   NoVote:
     printf("you are not eligible to vote");
    exit();
return 0; }

No comments :

Post a Comment