repl.it
@SylvianBryan/

Array Problem 1

C

No description

fork
loading
Files
  • main.c
  • main
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*Write a C Program that populates an mxm square matrix with random integers the range between 1 and m^2 (inclusive) such that: the values in the first-row range between 1 and m, the second-row ranges between m+1 and 2m, the third-row ranges between 2m+1 and 3m, so on.  The value of m is entered by the user. Then write a function that receives an array as a parameter and prints it lower diagonal ;   the function prints 0 for all other array values not on the lower diagonal.*/


#include <stdio.h>// Imput and Output Library Definition 
#include <time.h> // Time Library Definition
#include <stdlib.h>// Standard Library Definition

int main(void) {

int userNum; 

printf("Enter a number:"); 
scanf("%d", &userNum); 
int cells [userNum][userNum]; 





 

  return 0;
}