EmbLogic's Blog

program to print odd and even numbers using array.

head    1.1;
access;
symbols;
locks; strict;
comment    @ * @;

1.1
date    2014.03.19.07.00.53;    author Emblinux;    state Exp;
branches;
next    ;

desc
@this is a program to find out even and odd numbers.
@

1.1
log
@Initial revision
@
text
@#include<stdio.h>
int main()
{
int a[5],i,k;
printf(“enter all five numbers”);
for(i=0;i<5;i++)
scanf(“%d”,&a[i]);
for(k=0;k<5;k++)
{
if(a[k]%2==0)
printf(“this is even number : %d”,a[k]);
else
printf(“this is odd number : %d”,a[k]);
}
return 0;
}
@

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>