题目:
要求用户自定义三个函数(包括main),并生成一下输出:
Three blind mice
Three blind mice
See how they run
See how they run
其中一个函数要调用两次,该函数生成前两行;另外一个函数被调用两次,并生成其余的输出
源代码:
#include <iostream>
void print_one(void);
void print_two(void);
int main()
{
print_one();
print_one();
print_two();
print_two();
return 0;
}
void print_one(void)
{
std::cout << "Three blind mice" << std::endl;
}
void print_two(void)
{
std::cout << "See how they run" << std::endl;
}
演示效果: