0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
187 Ansichten1 Seite
Menu-based program having following menu-items should work on int array. Find sum of digits of each element of an int array and store each sum in respective element of another array. Give proper output.
Menu-based program having following menu-items should work on int array. Find sum of digits of each element of an int array and store each sum in respective element of another array. Give proper output.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOC, PDF, TXT herunterladen oder online auf Scribd lesen
Menu-based program having following menu-items should work on int array. Find sum of digits of each element of an int array and store each sum in respective element of another array. Give proper output.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOC, PDF, TXT herunterladen oder online auf Scribd lesen
• 1 Create an array to store five student’s ages; input the age values from user and
print array. • 1 Calculate sum of all elements of a float array and print it.
• 1 Calculate sum of odd or even elements (depending on user’s choice) of an int
array. • Calculate sum of even elements and product of odd elements of an int array. • 5 Count odd or even elements (depending on user’s choice) in an int array.
• 6 Count negative elements in an int array.
• 7 Count negative, positive and zero elements in an int array.
• 8 Print only prime elements of an int array.
• 9 Count non-prime elements of an int array.
0 Print and count only absolute elements in an int array.
0 Menu-based program having following menu-items: 1. Scan int array from user 2. Print all numbers 3. Print even numbers 4. Print prime numbers 5. Print non-prime numbers 6. Print absolute numbers 7. Print odd numbers 8. Exit These menu-items should work on an int array. • 1 Find sum of digits of each element of an int array and store each sum in respective element of another array. Give proper output. • 1 Find reverse of each element of an int array and store each reverse in respective element of another array. Give proper output. • 1 Find factorial of each element of an int array and store each factorial in respective element of another array. Give proper output. • 1 Find maximum element from an int array.
• 1 Find minimum element from an int array.
• 1 Find maximum or minimum element (depending upon user’s choice) in an int
array. • 1 Read an int variable (say search_int) from user. Now read an int array from user and count number of occurance of the variable search_int in the int array. Print the no. of occurance. 1) Write programs to -- • 1 Scan and add two int arrays and store answer in third int array.
• 2 Create menu-based array-caluculator to perform +,-,*,/ on two int arrays. Store