/* ㄏノ 0 繦诀计贺玻ネ 1,000,000  0  9 俱计 玻ネ计ぇ盢ㄤэ计じ (numeral character) 程硂﹃じぇ '\0' ﹃挡 (end-of-line) 才腹 ㄏㄤΘ 1,000,000 计﹃ (numeral string) ЧΘ˙艼祘Α絏 1. 盢案计 (even) 计じ簿埃 2. 块矪瞶计じ﹃ 3. 程 500 计じ﹃ 4. 璸衡块 3 计计じ计琌 '3' ㎝ '9' じ计 */ #include #include // ㄏノ跑计︽跑计 int main(void) { char digits[1000001]; // 皚盢纗 1000000 计﹃ (numeral string) char even_digits[6] = "02468"; // 案计计じ char odd_digits[6] = "13579"; // 计计じ char digit_3_9[3] = "39"; // 3 计计计じ char *ptr1, *ptr2; // ﹃夹 unsigned length; // ﹃ unsigned count_3_9[2]; // 3 计计じ计琌 '3' ㎝ '9' じ计 int i; // 癹伴跑计 srand(0); // ㄏノ 0 繦诀计贺 // 繦诀玻ネ 1000000  0  9 繦诀计盢ㄤ锣计じ (numeral character) for (i=0; i<1000000; i++) { digits[i]= (char)(rand() % 10) + 48; } digits[i] = '\0'; // ﹃挡 (end-of-string) 才腹 // 簿埃案计计じ // ***** ЧΘ祘Α // 块矪瞶计じ﹃ // ***** ЧΘ祘Α // 块程 500 计じ // ***** ЧΘ祘Α // 璸衡块 3 计计じ计琌 '3' ㎝ '9' じ计 // ***** ЧΘ祘Α system("pause"); return(0); }