Lab10 CSC103 - PF Arrays
Lab10 CSC103 - PF Arrays
TASKS:
1. Practice the examples, discuss in theory lectures and from the Chapter # 8 of text book.
2. Write a C++ program to solve the following problem. The program will use array to store
values and will take 15 integer values as input from user, each of which is between 20 and 200,
inclusive. As each number is read, validate it and store it in the array only if it isn’t a duplicate
of a number already read. After reading all the values, display only the unique values that the
user entered.
3. Write a C++ program which take 15 integer values as input from user and store them in an
array named list. And ask user to input an integer value in variable num and display on the
screen. The program will remove every occurrence of integer value num from the array, if the
integer value num is present in array. Also display the array list after removing the elements
from array.
4. Write a C++ program that prompts the user to input a string and outputs the string in uppercase
letters. (Use a character array to store the string.)
5. Write a C++ program that declares an array alpha of 50 elements of type double. Initialize
the array so that the first 25 elements are equal to the square of the index variable, and the last
25 elements are equal to three times the index variable. Output the array so that 10 elements
per line are printed.