Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  5. C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. #include <stdio.h>
  10.  
  11. int main()
  12. {
  13. int n,a[100][100],i,j,aux,ok=0;
  14. scanf(¨%d¨,&n)
  15. for(i=1;i<=n;i++)
  16. for(j=1;ij<=n;j++)
  17. {printf(¨a[%d][%d]=¨,i,j);
  18. scanf(¨%f¨,&a[i][j]);}
  19. for(i=1;i<=n-1;i++)
  20. for(j=i+2;j<=n;j++)
  21. if(a[i][j]!=0)
  22. ok=1;
  23. if()
  24. {aux=a[j][i];
  25. a[j][i]=a[i][j];
  26. a[i][j]=aux;}
  27.  
  28.  
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement