Objective : Learn to use if/else and switch statements to do decision making, then combine with for and while loops to perform some operations. 6.1 A circular prime is a prime number that remains prime as each leftmost digit (most significant digit), in turn, is moved to the right hand side. For instance, the number 19937 is a circular prime, since all numbers in the sequence 19937, 99371, 93719, 37199 and 71993 are prime numbers.
Write a program let the user input a range [i, j], computes the number of circular primes in that range. All integers will be less than 200,000 and greater or equal to 10. You can assume that in any pair i is lesser or equal than j.
input: 10 10 10 1000 10 200000
Output:
6.2 Write a program let the user input a pair of integers (m,n), determine whether m is the power of n.
Input: 0 0 0 2 2 2 16 2 243 9 243 3
Output :
繳交格式及規定 : 程式重點地方請加註解,給分也會酌量參考註解。 請繳交 .c 檔即可。 c 檔的檔名一律統一,以學號為檔名壓縮成一個以學號為名的壓縮檔 上傳, 上傳請一律繳交壓縮檔。