Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. void arraycreate(int* temp,int n){
  5.  
  6.     for(int i=0;i<n;i++){
  7.         for(int j=0;j<n-1;j++){
  8.             temp[i][j] = abs(i-j);
  9.         }
  10.     }
  11.  
  12. }
  13. int main()
  14. {
  15.     int n;
  16.     scanf("%d",&n);
  17.     int arr[n][n-1];
  18.     arraycreate(&arr,n);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement