学习用C++开发你的第一个游戏(英文)
# include <iostream>
using namespace std; // 命名空间std,之后的cout 和 endl 就不用再加上std:: 了
int main()
{
cout << "Welocm to Bulls and Cows, a fun word game." << endl;
cout << "Can you guess the x letter isogram I'm thinking of?\n";
return 0;
}
# include <iostream>
using namespace std; // 命名空间std,之后的cout 和 endl 就不用再加上std:: 了
int main()
{
constexpr int WORLD_LENGTH = 5; // 定义一个变量让单词的长度可变
cout << "Welocm to Bulls and Cows, a fun word game." << endl;
cout << "Can you guess the " << WORLD_LENGTH;
cout << " letter isogram I'm thinking of?\n";
return 0;
}
运行