运行 ❯
建立您
自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
#include <iostream> using namespace std; // Global variable x int x = 5; void myFunction() { cout << ++x << "\n"; // Increment the value of x by 1 and print it } int main() { myFunction(); cout << x; // Print the global variable x return 0; }
6
6