#include<stdio.h>
      int main()
      {
          int age;
          printf("Enter your age\n");
          scanf("%d", &age);
          printf("You have entered %d as your age\n", age);
          if (age>=18)
          {
            printf("You can vote!");
          }
          else
          {
              printf("You cannot vote");
          }
       return 0;   
       return 0;   
       return 0;   
       return 0;   
      }
      
      C language logo

      if else

      0

      0

      avatar
      omtajne11
      ifelse

      an example of if-else statement

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.