#include "stdio.h"
#include "conio.h"
void main()
{
int a[15],lar,I,n,odd,even;
printf("Enter the size of the array\n");
scanf("%d",&n);
printf("Enter the elements of the array\n");
for(I=0;I
lar=a[I];
}
printf("\n%d is largest Element in the array\n\n",lar);
for(I=0;I
{
if(a[I]%2!=0)
{
odd=a[I];
printf("%d : ",odd);
}
}
printf("are odd number \n\n");
for(I=0;I
{
if(a[I]%2==0)
{
even=a[I];
printf("%d : ",I);
}
}
printf("Even number position \n\n");
for(I=0;I
{
if(a[I]%2==0)
{
even=a[I];
printf("%d : ",even);
}
}
printf("are even number \n\n");
}
No comments:
Post a Comment