W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
using namespace std; int add(int myNumber) { static int total = 0; total += myNumber; return total; } int main() { cout << add(5) << "\n"; cout << add(2) << "\n"; cout << add(4) << "\n"; cout << add(9) << "\n"; return 0; }