Vous êtes sur la page 1sur 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-"*

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ INSTRUCTIONS: 1. Please upload the source code through moodle in two stages: a. 1st stage up to choice number 2 by 5th December 2011 at 11:59 p.m b. 2nd stage : a complete program by 11 December 2011 at 11:59 p.m 2. Please submit the hardcopy of the complete program at the the assignment box at level 7 by 12 December 2011 5 p.m You report should include: Course: Name: Matric No: The name of the file that you upload must follow this standard: CPT111YOUR FULL NAME/MATRIC NUMBER. Course Policy: All assignments MUST be submitted before/on the given date. Late submissions without prior approval from the lecturer will not be accepted. One grade will be deducted for each day, for students with approval. If a student is found to misuse the amenities given, the permission will be taken away from the student. Plagiarism/pirating and copying are serious academic offence. Students that are found to plagiarize/or copying will get an F for the assignment/report or for the whole coursework grade and will be barred from taking the final examination. Please read your undergraduate Programme Handbook.

Vous aimerez peut-être aussi