Exercise_FlowChart.docx

# P ự ệ ? gi m n xu ng n n 10 tăng count ả ố

• No School
• AA 1
• 5

This preview shows page 4 - 5 out of 5 pages.

p: gi m N xu ng: N = N /10 =>tăng count Th c hi n l i vòng l p đ n khi N = 0 thì thoát kh i vòng l p. ế - Output: count 1.11 BÀI T P 11 1. Th i l ng: ượ 15 phút 2. Mô t bài toán: Vi t m t đo n mã gi và v m t l u đ đ gi i bài toánsau ế ư :

Subscribe to view the full document.

Nh p vào s N (v i N>0).Ki m tra s nguyên d ng N có toàn ch s ch n hay ko? ươ ữ ố 3. G i ý: - D li u input: N - Khai báo count = 0, flag = 0 - Th c hi n vòng l p : number = N MOD 10 => N u number là s l => vi ph m => flag = 1 ế ố ẻ (đánh d u s vi ph m)=> Thoát vòng l p Ng c l i , n u number không là s l =>gi m N xu ng: N = N /10 ượ ế ố ẻ Th c hi n l i vòng l p đ n khi N = 0 thì thoát kh i vòng l p ế - Sau khi thoát vòng l p, n u flag v n = 0 thì Output : N toàn ch s ch n. ế ữ ố
• Fall '19

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern