Module 3 Assessments
Module 3 Assessments
ELABORATE 7
Instructions: Perform and apply the characteristics of a good program.
1. Develop a C++ program to fine the value of the following expression, where c, i, t, are constants
and belong to the data type float.
Y = cx2 + ix + t; if x >= 4
= cx2 + ix + t; if x < 4
ANSWER:
2. Write a program to calculate the commission of a salesman of cars as per following data:
SALES COMMISSION
More than & Equal to Rs. 100000 25%
Rs. 80000 to Rs. 99999 22.5%
Rs. 60000 to Rs. 79999 20%
Rs. 40000 to Rs. 59999 15%
Less than Rs. 40000 15.5%
ANSWER:
ANSWER:
ANSWER:
5. Based from the programs you have developed in this worksheet. Did you encounter problems
while developing and writing the said programs? If yes, what are those problems and how did you
manage to solve them? If none, what did you do to make your program syntax error and bugs free?
Expound your answers.
ANSWER:
ELABORATE 8
1. Write a C++ program to search the position of a number out of the array with 10 values.
Sample Output:
ANSWER:
Sample Output:
ANSWER:
3. Write a C++ program which initializes a set of characters in one-dimensional character array.
Sample Output:
NAME[0] = D
NAME[1] = I
NAME[2] = V
NAME[3] = I
NAME[4] = N
NAME[5] = E
ANSWER: