Assignment 13 : One dimensional Arrays
Hi,
- Write a “C” Program to read the elements in to the array and print the sum of even numbers in it. for example if the input array is {10,15,20,23,40} the output should be 38.
- Write a “C” Program to read the elements in to the array and print the sum of even numbers in it.for example if the input array is {10,15,20,23,40} the output should be 70.
- Write a “C” Program to read the elements in to the array and print the even numbers in it. for example if the input array is {10,15,20,23,40} the output should be 10,20,40;.
- Write a “C” Program to read the elements in to the array and print the odd numbers in it. for example if the input array is {10,15,20,23,40} the output should be 15,23.
- Write a “C” Program to read the elements in to the array and print the sum of minimum element and maximum element in the array. for example if the input array is {10,1,2,40,5} then the output is 41.
- Write a “C” Program to read the elements in to the array and print only the even number position numbers (even indexed) in the array. for example if the array is 10,11,23,45,56,78,90}; here the indexing starts from ‘0’ the even position indexed numbers are 0,2,,4,6… The output of this program should print 10,23,56,90.
- Write a “C” Program to read the elements in to the array and print only the odd number position numbers (odd indexed) in the array. for example if the array is {10,11,23,45,56,78,90}; here the indexing starts from ‘0’ the odd position indexed numbers are 1,3,5,7… The output of this program should print 11,45,78.
- Write a “C” Program to read the elements in to the array and print the greatest number in that array is even number or odd number. for example if the array is {10,20,45,66,1} the maximum element here is 66. it is an even number.
- Write a “C” Program to read the elements in to the array and print the smallest number in that array is even number or odd number. for example if the array is {10,20,45,66,1} the smallest element here is 1. it is an odd number.