Guest User

Untitled

a guest
May 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. const int n=10;
  3. void main(){
  4. int d=0,i,j;
  5. for(i=0;i<9;i++){
  6.     for(j=0;i<9;j++)
  7.         cin>>a[i][j];
  8. }
  9. for(i=0;i<9;i++){
  10.     for(j=0;j<9;j++)
  11.         if(i+j=n-1){
  12.             d+=a[i][j];
  13.         }
  14. }
  15. cout<<d;
  16. }
Add Comment
Please, Sign In to add comment