📄 pr04012.cpp
字号:
////////////////////////////////////////
// File Name: pr04012.cpp
////////////////////////////////////////
#include <iostream>
#include <cstdlib>
////////////////////////////////////////
// The main() function.
////////////////////////////////////////
int main()
{
char selection = '\0';
while (selection != 'q')
{
std::cout << "S-how number, Q-uit: ";
std::cin >> selection;
if (selection != 's' && selection != 'q')
{
std::cout << '\a';
continue;
}
if (selection == 's')
std::cout << std::rand() << std::endl;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -