Monday, November 1, 2021

PROGRAME ON IF-ELSE CONTROL STATEMENT

#include <stdio.h>


int main() {

    int age;

    printf("Enter your age\n");

    scanf("%d",&age);

    printf("you have enterd %d as your age\n",age);

    if(age>18) 

    {

    printf("you can vote");

}

else if (age>10)

{

printf("you are between 10 to 18 and you can vote for babis");

}

else 

{

    printf("you can not vote");

}


return 0;

}

No comments:

Post a Comment

A Day in the Life of a Computer Science Student

  💻 A Day in the Life of a Computer Science Student Being a computer science student is often misunderstood. People assume we just sit ...