分析:

本题为入门级别的编程题,C/C++中提供了多种方法用于输出字符。

解法1:

使用cout直接输出对应字符串

#include <bits/stdc++.h>
using namespace std;

int main() {
    cout << "Practice makes perfect!" << endl;
    return 0;
}

解法2:

使用printf函数输出字符串

#include <bits/stdc++.h>
using namespace std;

int main() {
    printf("Practice makes perfect!\n");
    return 0;
}

解法2:

使用puts函数输出字符串

#include <bits/stdc++.h>
using namespace std;

int main() {
    const char words[] = "Practice makes perfect!";
    puts(words);
    return 0;
}

分析:

本题考察了对C/C++中的输出函数的使用,熟悉和掌握对应的方法即可。本题时间,空间复杂度皆为O(1)。