Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the array A filled with random integers and using row and col correctly fi

ID: 3765579 • Letter: G

Question

Given the array A filled with random integers and using row and col correctly find the smallest number and print it: (Answer: in c language)

Int A[10][20]; Int row, col, min, I; FillArray(A); //assume this fills the array Given the array A filled with random integers and using row and col correctly find the smallest number and print it: (Answer: in c language)

Int A[10][20]; Int row, col, min, I; FillArray(A); //assume this fills the array (Answer: in c language)

Int A[10][20]; Int row, col, min, I; FillArray(A); //assume this fills the array

Explanation / Answer

Given :

int row,col,min;

int A[row][col]; // row is number of rows and col is number of columns

FillArray(A);// assume this fills the array with random numbers

---------------------------------------------------------------------------------------------

Answer :

---------------------------------------------------------------------------------------------

int i,j; // used in loops

for(i = 0 ; i < row ; i++) // row traverse

for(j = 0 ; j < col ; j++) // col traverse

if(A[i][j] < min) // min check

min = A[i][j]; // min update

printf("The min integer in the given array A = %d",min); // print min

------------------------------------------------------------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote