📄 pr05007.cpp
字号:
////////////////////////////////////////
// File Name: pr05007.cpp
////////////////////////////////////////
#include <iostream>
// Function prototype.
int Gather();
////////////////////////////////////////
// The main() function.
////////////////////////////////////////
int main()
{
int gwool = 0;
while (gwool < 60)
{
gwool = Gather();
std::cout << gwool << std::endl;
}
}
////////////////////////////////////////
// Return the current value of the wool
// static variable.
////////////////////////////////////////
int Gather()
{
// A static local variable.
static int wool = 50;
return ++wool;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -