Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ functions and main function. TY. Note that there are no empty cells, just zero cells, in these numerical examples. 1-1. Given a matrix of
C++ functions and main function. TY.
Note that there are no empty cells, just zero cells, in these numerical examples. 1-1. Given a matrix of integers, return the sum of the elements along the main diagonal (top left bottom right) Signature: int diagonal (int array[4][4]) Note. This function should be placed in function-1-1.cpp and the matching main function in main-1-1.cpp) 1-2. Given a matrix of integers with 10 rows and 10 columns, write a function and program to determine if the matrix is an identity matrix or not. Return a 1 if it is an identity matrix and a O if not. (Definition: An identity matrix is one with 1's down the main diagonal and O's elsewhere) Signature: int identity(int array[10][10]) 1-3 Given a matrix of integers, count the amount of times each number 0-9 appears. Print out your results on one line in the following form: :number of zeros;1:number of ones;2:number of twos;3:number of threes;4:number of fours;5:number of fives6:number of sixes; 7:number of sevens; 8:number of eights;9:number of nines; For example, if you are passed an identify matrix, it contains 12 zeros and 4 ones and no other numbers from O to 9,your output would be: 0:12;1:4;2:0;3:0;4:0;5:0;6:0;7:0;8:0;9:; Note the colons and semi-colons. Signature: void count_numbers(int array[4][4])Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started