Cit 3102 Fundamentals of Comp Programming
Cit 3102 Fundamentals of Comp Programming
a) Design a C program to input product name, quantity and price then calculate the total price, tax and
net price. Where tax=10% of total prince and net=total price-tax. (4marks)
b) Write a program to enter two numbers then use a function to calculate their sum (4marks)
c) Write a program to input six integers into an array the n display the biggest and the smallest elements
in the array (4marks)
d) A Banks classify its customers depending on period of operation and outstanding balance to issue
loan. Customers are classified as show below:
e) Write a program to input customer name, classification and determine loan amount using switch
(6marks)
f) Briefly explain the importance of using comments in a program. (4marks)
a) Write a program to enter integer values to a 3 by 4 array then display the result (4marks)
b) Briefly explain he purpose of the following statements in C program (4marks)
i. Continue
ii. Break
c) Write a C program that accepts two numbers and operator (+,-,/,*) computes the result depending on
the operator entered, and then output the numbers, operator and the result. (6marks)
d) Write a program to input dimension of a cylinder then use a function to calculate volume of the
cylinder. Where volume = ℎ (4marks)
54321
4321
321
21
1