Advertisement
Lisaveta777

to do, good!!!

Dec 24th, 2019
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.13 KB | None | 0 0
  1. //https://otvet.mail.ru/question/217817109
  2. /******************************************************************************
  3.  
  4. Welcome to GDB Online.
  5. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  6. C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  7. Code, Compile, Run and Debug online from anywhere in world.
  8.  
  9. *******************************************************************************/
  10. #include <stdio.h>
  11. #define M 4
  12.  
  13. int main()
  14. {
  15.     int i,j,k,fk,oi,oj,ni,nj,arr[M][M]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
  16.    
  17.    
  18.     for(i=0;i<M;i++)
  19.     {
  20.        for(j=i;j<M;j++)
  21.           arr[i][j]*=-1;
  22.     }
  23.    
  24.     fk= (M*M-M)/2;
  25.     //oi=1;oj=0;
  26.     for(i=1;i<M;i++)
  27.     {
  28.        for(j=0;j<i;j++)
  29.           {
  30.               for(k=0;k<fk;k++)
  31.               {
  32.                   printf("k-%d\t",k);
  33.               }
  34.               printf("\n");
  35.           }
  36.           //arr[i][j]=99;
  37.     }
  38.    
  39.     for(i=0;i<M;i++)
  40.     {
  41.        for(j=0;j<M;j++)
  42.           printf("%d\t",arr[i][j]);
  43.     printf("\n");
  44.     }
  45.     return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement