Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  iek5 douleuei
Language: C/C++
Code:
#include <stdio.h> 
 main() 

int p[5][5], x, y, sumx, sumy, sum; 


for(x=0; x<=3; x++) 
for(y=0; y<=3; y++) 

printf("dose stoixeio p [%d,%d]: ", x, y); 
scanf("%d", &p[x][y]); 

sum=0; 
for(x=0; x<=3; x++) 

sumx=0; 
sumy=0; 
for(y=0; y<=3; y++) 

sumx=sumx+p[x][y]; 
sumy=sumy+p[y][x]; 
sum=sum+p[x][y]; 

p[x][4]=sumx; 
p[4][y]=sumy; 

p[4][4]=sum; 
for(x=0; x<=4; x++) 
{for(y=0; y<=4; y++) 
printf("%d\t",p[x][y]); 
printf("\n"); 

getchar(); 
Comments: