My Project
Functions
array.cpp File Reference
#include <iostream>
#include <stdlib.h>
Include dependency graph for array.cpp:

Functions

int fillArray (int myArr[7][7])
 fillArray() - taking a 2-D integer square matrix with fixed size as argument. More...
 
void printSpiral (int myArr[7][7])
 printSpiral() - taking a 2-D integer square matrix with fixed size as argument. More...
 
void printCol (int myArr[7][7], int s, int e)
 printCol() - taking a 2-D integer square matrix with fixed size, and integers s and e for signifying the range of columns as arguments. More...
 
int findMin (int myArr[7][7])
 findMin() - taking a 2-D integer square matrix with fixed size as argument. More...
 
int findAverage (int myArr[7][7])
 findAverage() - taking a 2-D integer square matrix with fixed size as argument. More...
 
void printArray (int myArr[7][7])
 printArray() - taking a 2-D integer square matrix with fixed size as argument. More...
 
int main ()
 Main function where program execution starts.
 

Function Documentation

int fillArray ( int  myArr[7][7])

fillArray() - taking a 2-D integer square matrix with fixed size as argument.

This function fills the empty 2-D square matrix with random values in the range (20, 400).

int findAverage ( int  myArr[7][7])

findAverage() - taking a 2-D integer square matrix with fixed size as argument.

This function calculates the mean of all the values present in the provided 2-D matrix.

int findMin ( int  myArr[7][7])

findMin() - taking a 2-D integer square matrix with fixed size as argument.

This function finds the minimum element in the 2-D matrix.

void printArray ( int  myArr[7][7])

printArray() - taking a 2-D integer square matrix with fixed size as argument.

This function prints the complete 2-D matrix on STDOUT

void printCol ( int  myArr[7][7],
int  s,
int  e 
)

printCol() - taking a 2-D integer square matrix with fixed size, and integers s and e for signifying the range of columns as arguments.

This function prints the columns {s, s+1, s+2, .... e}

void printSpiral ( int  myArr[7][7])

printSpiral() - taking a 2-D integer square matrix with fixed size as argument.

This function prints the 2-D matrix in an anticlockwise spiral form (i.e. like a two dimensional spiral).