เฉลยข้อสอบคอมโปรฯ Q3

รับตัวเลขจำานวนเต็มบวกจากแป้นพิมพ์ นับจำานวนเลขคู่ จนกว่าจะใส่เป็น 0 แสดงผลลัพธ์ออกทาง
จอภาพ

ตัวอย่างผลรันเมื่อกรอก 1 2 3 4 5 6 7 8 9 0
Input an integer: 1
Input an integer: 2
Input an integer: 3
Input an integer: 4
Input an integer: 5
Input an integer: 6
Input an integer: 7
Input an integer: 8
Input an integer: 9
Input an integer: 0
Even count = 4

Leave a Reply

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องข้อมูลจำเป็นถูกทำเครื่องหมาย *

This site uses Akismet to reduce spam. Learn how your comment data is processed.