Вы находитесь на странице: 1из 2

# PUSAT PENGAJIAN SAINS KOMPUTER UNIVERSITI SAINS MALAYSIA Semester 1 Session 2011/2012

## CPT111 Principles of Programming Assignment Functions

You are to include the following details: (i) Specification Requirements (ii) Problem analysis (iii) Design (flow chart or pseudocode) Write a complete program that will display a menu to the user and process depending on the users input. The program will 1. Display the current date in the format of Day( in number) month ( in alphabet) and year when the user input in the form of ddmmyy. 2. Emirp ( programming exercise 6.5) 3. Palindrome prime ( programming exercise 6.6) 4. Area of Pentagon ( (programming exercise 6.12) 5. Area of a regular polygon ( programming exercise 6.13)

Example of program execution: Welcome to my program . This program will !" #\$%&'()*+(,-*\$.*/01*##*20.,3*4-(1*\$/*)05*\$.&5,*++66))* 7" 8\$9-*(*&1\$6-*:3\$;3*\$%*(*1-9-1%-*0/*(.0,3-1*&1\$6-*<\$9-.*.*:3\$;3*\$%*,3-*/\$1%,* .*-.,1\$-%* =" #\$%&'()*,3-*/\$1%,*!>>*&('\$.+106-*&1\$6-* ?" @(';5'(,-*,3-*(1-(*0/*(*&-.,(<0.*<\$9-.*%\$+-*0/*(*&-.,(<0.* A" @(';5'(,-*,3-*(1-(*0/*(*1-<5'(1*&-.,(<0.*<\$9-.*,3-*.56B-1*0/*%\$+-%*(.+* '-.<,3*0/*(*%\$+-"* C" >*\$/*)05*:(.,*,0*D5\$,* * E'-(%-*\$.&5,*)051*;30\$;-F*!** 405*3(9-*;30%-.*!** *E'-(%-*\$.&5,*+(,-*\$.*,3-*/016(,*++66))*F*>!!7!!* 4051*+(,-*\$%*!%,*#-;-6B-1*7>!!* * E'-(%-*\$.&5,*)051*;30\$;-*F*>* * G3(.H*405*/01*5%\$.<*6)*&10<1(6*"*I--*)05*.-J,*,\$6-"*