Joke Collection Website - Cold jokes - Problems with C language. Beginners. Please don’t laugh at me if you make childish mistakes -0-
Problems with C language. Beginners. Please don’t laugh at me if you make childish mistakes -0-
Changing to the following program will get the results you want?
#include
int?main()
{?
int?a[5][5];?
int?getdata(int?b[5][5]);?
int?output(int?c[5][5]);?
getdata(a);?
output(a);?
return?0;
}
int?getdata(int?b[5][5])
{
?int?i,j,x=1;?
?for(i=0;i<=4;i++)?
for(j=0;j< =4;j++)
{ b[i][j]=x; ?
printf("%d\t",x);
if(x%5==0)printf("\n");
x++;?
}?
return?0;
}
int?output(int?c[5][5])
{ int?m,n;?
for( m=0;m<=4;m++)?
{? for(n=0;n<=4;n++)?
{
if(m<=n)
printf("%d\t",c[m][n]);?
?else
? printf("\t");?
?}?
?printf("\n");?
?}
< p> ??return?0;
?}
- Previous article:The pure love novel The Warden is Sick proudly focuses on the X handsome assassin.
- Next article:Vernier calipers are not alone.
- Related articles
- How to describe others meddling?
- The unique choice of the name of the heart.
- Judtin joke
- The most difficult province for mathematics in the national college entrance examination
- Qin Shihuang put his mother under house arrest in Jiaonan, which was extremely cruel because of his Oedipus complex.
- My mother has been speaking ill of me behind my back. I am really depressed! What should I do?
- What should I pay attention to when ordering food when I go to eat western food for the first time?
- I dreamed last night. Dreaming of thunder. . What a loud thunder. And like the legendary thunderbolt. . . But it's okay to hit me. . This is the rhythm of Du Jie.
- The clown's action amused everyone.
- The classic lines of la la in the movie