T.V. NAGARAJU TECHNICAL SOLUTIONS
Pages
Home
Online Courses
Tutorials
Operating Systems
C -Excercises
Python Excercises
JAVA Exercises
Placement Papers
Lab Programs
Python Programs
check even or odd using conditional operator
#include<stdio.h>
int main() {
int x,res;
scanf("%d",&x);
(x%2==0) ? printf("even"):printf("odd");
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment