C++ 统计可被 9 整除的数字个数 - 代码示例
#include "iostream"\nusing namespace std; \n\nint main() {\n int n; \n cin >> n; \n int count = 0; \n for (int i = 0; i < n; i++) { \n int num; \n cin >> num; \n if (num % 9 == 0) { \n count++; \n } \n } \n cout << count << endl; \n return 0; \n}
原文地址: https://www.cveoy.top/t/topic/pPPu 著作权归作者所有。请勿转载和采集!