A program to explain SIMPLE IF
C Programming Language 015
The following code shows how to write a program to explain SIMPLE IF
Program
#include <stdio.h>
void main()
{
int age;
printf("Enter age: ");
scanf("%d", &age);
if (age > 18)
{
printf("Eligible to vote");
}
printf("\n");
}
Result
Enter age: 35
Eligible to vote
Last Updated on
Comments