Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://otvet.mail.ru/question/217817109
- /******************************************************************************
- Welcome to GDB Online.
- GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
- C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
- Code, Compile, Run and Debug online from anywhere in world.
- *******************************************************************************/
- #include <stdio.h>
- #define M 4
- int main()
- {
- 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};
- for(i=0;i<M;i++)
- {
- for(j=i;j<M;j++)
- arr[i][j]*=-1;
- }
- fk= (M*M-M)/2;
- //oi=1;oj=0;
- for(i=1;i<M;i++)
- {
- for(j=0;j<i;j++)
- {
- for(k=0;k<fk;k++)
- {
- printf("k-%d\t",k);
- }
- printf("\n");
- }
- //arr[i][j]=99;
- }
- for(i=0;i<M;i++)
- {
- for(j=0;j<M;j++)
- printf("%d\t",arr[i][j]);
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement