lab5_1.cpp
来自「清华大学出版社出版的c++程序设计课本」· C++ 代码 · 共 28 行
CPP
28 行
#include <iostream.h>
void fn1();
int x = 1, y = 2;
int main()
{
cout << "Begin..." << endl;
cout << "x = " << x << endl;
cout << "y = " << y << endl;
cout << "Evaluate x and y in main()..." << endl;
int x = 10, y = 20;
cout << "x = " << x << endl;
cout << "y = " << y << endl;
cout << "Step into fn1()..." << endl;
fn1();
cout << "Back in main" << endl;
cout << "x = " << x << endl;
cout << "y = " << y << endl;
return 0;
}
void fn1()
{
int y = 200;
cout << "x = " << x << endl;
cout << "y = " << y << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?