/*
* Copyright (c) 2014,烟台大学计算机学院
* All rights reserved.
*文件名称: test.cop
*作者:翟兴雷
*完成日期:2014年12月4日
*版本号:v1.0
*
*问题描述:
*输入描述:
*程序输出:
*/
#include <iostream>
using namespace std;
int *p;
void pp(int a, int *b);
int main()
{
int a=1, b=2, c=3;
p=&b;
pp(a+c, &b);
cout<<"(2)"<<a<<','<<b<<','<<*p<<endl;
return 0;
}
void pp(int a, int *b)
{
int c=4;
*p=*b+c;
a=*p-c;
cout<<"(1)"<<a<<','<<*b<<','<<*p<<endl;
}
第十五周项目2(2)阅读程序
最新推荐文章于 2023-03-11 23:25:39 发布