Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int n;
  7.     cin >> n;
  8.  
  9.     //1D array n elements
  10.     int *A;
  11.     A = (int *) calloc (n, sizeof (int));
  12.  
  13.  
  14.     //2D array n*n elements
  15.     int **B;
  16.     B = (int **) calloc (n, sizeof (int));
  17.     for(int i = 0; i < n; i++)
  18.         B[i] = (int *) calloc (n, sizeof (int));
  19. }
Add Comment
Please, Sign In to add comment