
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Programming I; Subject: Computer Science; University: Harding University; Term: Spring 2010;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

start
stop
Ask for a number and call it X.
Is D > X - 1?
R Remainder of X / D.
Is R = 0?
Is P = 1?
Answer is "Yes"
Answer is "No"
yes no
no
yes
yes
no
start
Get a number and call it X
Is D = X?
Is the remainder of X/D = 0? Print D
Print D
stop
yes
no
yes no