First of all please switch to a sensible way of getting data from the user:
printf("enter a number: ");
scanf is a terminally broken way of getting user input, I have no idea why tutors insist on keeping teaching it; it's retarded and bugridden and nobody with any skill uses it. sscanf and fscanf to process preformatted data or files are both fine, but using scanf to get data from the user Just Doesn't Work(TM).
No output at all? Are you sure about that? After you've entered 1 for m and n I would expect to see at least "Enter the element a=". If you're not seeing that then "scanf("%d", &n);" must be crashing.
By output I mean stuff displayed on the screen by the program, not necessarily final results. There must be some output if it's showing an error.
So what error is it showing? (The program doesn't display "error in processing data" at any point, unless you've added that since uploading the code.)