Have a Read!

Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!

Thursday, January 27, 2011

C PROGRAM FOR CONDITIONAL OPERATER

#include<stdio.h>
int main()
{
int age;
printf("ENTER YOUR AGE IN YEARS\n");
scanf("%d",&age);
(age>=18) ?printf("\nYOU SHOULD VOTE\n"): printf("\nYOU CANNOT VOTE\n");
return 0;
}

No comments:

Post a Comment

Related Posts with Thumbnails