C++大神帮我看看哪里错了
#include<iostream.h>voidfunc();intn=1;intmain(){staticintx=5;inty;y=n;cout<<"x="<<x<<...
#include<iostream.h>
void func();
int n=1;
int main()
{
static int x=5;
int y;
y=n;
cout<<"x="<<x
<<",y="<<y
<<",n="<<n<<endl;
func();
}
void func()
{
static int x=4;
int y=10;
int n=2;
x+=2;
n+=10;
y+=n;
cout<<x<<y<<n<<endl;
} 展开
void func();
int n=1;
int main()
{
static int x=5;
int y;
y=n;
cout<<"x="<<x
<<",y="<<y
<<",n="<<n<<endl;
func();
}
void func()
{
static int x=4;
int y=10;
int n=2;
x+=2;
n+=10;
y+=n;
cout<<x<<y<<n<<endl;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询