Sunday, September 21, 2014

Day 5 - 1: Number array

1. Write a program that asks the user to type 10 integers of an array. The program must compute and write how many integers are greater than or equal to 10.




2. Write a program that asks the user to type 10 integers of an array. The program must output the largest element in the array, and the index at which that element was found.


3. Input values are accepted from the user into the array. Displays highest of the entered values. Prints average of values entered.


4. Write a program that accepts the following numbers in an array and reverses the array


5. Write a program to count the number of vowels in a line of text


6. Write a program that asks the user to type 10 integers of an array and an integer V. The program must search if V is in the array of 10 integers. The program writes "V is in the array" or "V is not in the array".


7. Write a program that asks the user to type 10 integers of an array and an integer value V. The program must search if the value V exists in the array and must remove the first occurrence of V, shifting each following element left and adding a zero at the end of the array. The program must then write the final array


8. Write a program that asks the user to type 10 integers of an array and an integer value V and an index value i between 0 and 9. The program must put the value V at the place i in the array, shifting each element right and dropping off the last element. The program must then write the final array


9. Write a program that asks the user to type 10 integers of an array. The program will then display either "the array is growing", "the array is decreasing", "the array is constant", or "the array is growing and decreasing."


10. Write a program that asks the user to type 10 integers of an array. The program will then sort the array in descending order and display it.

11. Write a program which takes 2 arrays of 10 integers each, a and b. c is an array with 20 integers. The program should put into c the appending of b to a, the first 10 integers of c from array a, the latter 10 from b. Then the program should display c.

No comments:

Post a Comment