[Error] C:\Users\Administrator\Documents\C-Free\Temp\未命名1.cpp:5:22: empty character constant
#include<iostream>usingnamespacestd;intmain(){chardiamond[][5]={{'','','*'},{'','*','...
#include <iostream>
using namespace std;
int main()
{
char diamond[][5]={{'','','*'},{'','*','','*'},{'*','','','*'},
{'','*','','*'},{'','','*'}};
int i,j;
for(i=0;i<5;i++)
{for(j=0;j<5;j++)
cout<<diamond[i][j];
cout<<endl;
}
} 展开
using namespace std;
int main()
{
char diamond[][5]={{'','','*'},{'','*','','*'},{'*','','','*'},
{'','*','','*'},{'','','*'}};
int i,j;
for(i=0;i<5;i++)
{for(j=0;j<5;j++)
cout<<diamond[i][j];
cout<<endl;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询