DIT 305 – PROGRAMMING METHODOLOGY

UNIVERSITY EXAMINATIONS: 2019/2020
STAGE III: EXAMINATION FOR DIPLOMA IN INFORMATION
TECHNOLOGY
DIT 305: PROGRAMMING METHODOLOGY
MODE: FULL TIME/PART TIME
ORDINARY EXAMINATIONS
DATE: MAY, 2020 TIME: 2 HOURS
INSTRUCTIONS: Answer ALL Questions

SECTION II: 20 MARKS. PRACTICAL QUESTION.
Write a C program that uses functions. The main() method holds an integer variable named
numberOfEggs to which you will assign a value. Create a method called myEggs() to which you
pass numberOfEggs. The method displays the eggs in dozens; for example, 50 eggs is 4 full dozen
(with 2 eggs remaining).
SECTION III: 20 MARKS. APPLICATION QUESTION.
A retail business must file a monthly sales tax report listing the total sales for the month and the
amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county
sales tax rate is 2 percent of the monthly sales. Develop a C program that asks the user to enter
the total sales for the month then calculate and display the following:
• The amount of county sales tax
• The amount of state sales tax
• The total sales tax (county plus state)

(Visited 132 times, 1 visits today)
Share this:

Written by