EASY 2 LEARN 'C'
Home
DotNet
Monday, 27 August 2012
program for even/odd number
Program for even/odd Number
#include<stdio.h>
main()
{
int a;
clrscr();
printf("enter the value of a:");
scanf("%d",&a);
if(a%2 == 0)
printf(" even");
else
printf("odd");
getch();
}
output
:-
enter the value of a: 7
odd
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Search Box
'C' Language
'C' Programming
(27)
Arrays in 'C'
(5)
Interview Que's about 'C'
(8)
Strings in 'C'
(4)
Popular Posts
One dimensional array example 2
One dimensional array example /* program to calculate sum of 10 numbers in an array */ #inc...
Conditions of the variables
Conditions of the Variables Condition is a comparison between variables. Conditions are divided i...
Logical Interview Questions2
Logical Interview Questions There are three boxes with fruits: one box with apples, one bo...
'C' interview questions
'C' Interview Questions * Without using (;)semicolon print the message? Ans...
Two dimensional array
Two dimensional Array Two dimensional array syntax ...
program for prime number
prime number :- #include<stdio.h> int main() { int n,i,count=0; printf("Enter a number: "); scanf("%d...
switch statement
Switch statement Switch is a keyword,it is used to create attractive interaction betwe...
program for fibonacci series
Program for Fibonacci series #include<stdio.h> main() { int a,b,c,i; clrscr(); a=0; b=1; printf("fibo...
Temperature Conversion
Temperature Conversion #include<stdio.h> main() { ...
program for even/odd number
Program for even/odd Number #include<stdio.h> main() { int a; ...
0 comments:
Post a Comment