第十二周项目一——程序阅读(4)

来源:互联网 发布:mac pro2018发布时间 编辑:程序博客网 时间:2024/04/30 08:24

/*
 * Copyright (c) 2014, 烟台大学计算机学院
 * All rights reserved.
 * 文件名称:test.cpp
 * 作    者:李晓凯
 * 完成日期:2014年 11 月 16 日
 * 版 本 号:v1.0
 *

 * 问题描述:根据程序计算结果

 * 输入描述:

 * 程序输出:输出结果

 */

#include <iostream>using namespace std;void cude();int main(){    extern int x;    x=5;    cude();    cout<<x<<endl;    return 0;}int x=10;void cude(){    x=x*x*x;}


预计运行结果:125

实际运行结果:


0 0