40 likes | 120 Views
344-521 องค์ประกอบและสถาปัตยกรรมคอมพิวเตอร์ Computer Architecture and Organization. Pretest. Pretest: 1. Prime palindrome is a number which is a prime number and a palindrome (the same number when read forward as backward). Example: 5, 7, 151, 353. Pretest: 1.
E N D
344-521องค์ประกอบและสถาปัตยกรรมคอมพิวเตอร์Computer Architecture and Organization Pretest
Pretest: 1 • Prime palindrome is a number which is a prime number and a palindrome (the same number when read forward as backward). • Example: 5, 7, 151, 353
Pretest: 1 • Write a program that finds all prime palindrome in the range of two supplied numbers a and b ( 5 < a < b <= 100,000); both a and b are considered to be within the range. • Example of Sample input and output • Input: 5 500 • Output: 5 7 11 101 131 181 191 313 353 373 383
Pretest: 2 • จงเขียนโปรแกรมเพื่อค้นหาข้อมูลที่ต้องการจากแฟ้มข้อมูลชื่อ data.txt • ตัวอย่างแฟ้มข้อมูล data.txt Input: Enter data to search: 42 Output: 42 is found.