Write a c program to read n integers from the keyboard and store them in the
array AR. The elements in AR are copied into array OAR and others are
copied into array EAR . Print the values in OAR and EAR. */
# include
# include
void main()
{
int AR[20],OAR[20],EAR[20],n,i,j=0,k=0;
clrscr();
printf("Enter the total number of elements in the array:");
scanf("%d",&n);
for(i=0;i
printf("Enter the %d element:",i+1);
scanf("%d",&AR[i]);
if((AR[i]%2)==0)
{
EAR[j]=AR[i];
j++;
}
else
{
OAR[k]=AR[i];
k++;
}
}
printf("\nEAR");
for(i=0;i
printf("\n\nOAR");
for(i=0;i
getch();
}
/* Output
Enter the total number of elements in the array:2
Enter the 1 element:1
Enter the 2 element:2
EAR
2
OAR
1*/
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Tuesday, December 30, 2008
C program to read n integers from the keyboard and store them in the array
Posted by ars at 12:04 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment