第八章 编程练习答案 – 一开始没看懂题目意思,百度参考了一下别人的结果。 #include <iostream>using namespace std; int count 0; void Printf(const char * str, int n 0);//默认参数 int main() {const char* str "hello!";Printf(str);Printf(str, 1);Printf(str, 0);Printf(str, -1); return 0; }void Printf(const char *……