Docstoc

30

Document Sample
30 Powered By Docstoc
					#include<conio.h> #include<fstream.h> void main() {clrscr(); int sum=0,v[11][11],i,k,n,j; ifstream f("mat.in"); f>>n; for(i=1;i<=n;i++) for(j=1;j<=n;j++) f>>v[i][j]; for(k=n;k>=2;k--) for(i=n;i>=k;i--) sum+=v[i][n-i+k]; cout<<"suma elementelor este "<<sum<<endl; getch();}


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:19
posted:10/30/2008
language:
pages:1