Write a C++ program that takes a matrix as input from the user and finds the largest element in it. The program should prompt the user to enter the number of rows and columns of the matrix, followed by the actual elements of the matrix. The program should use nested loops to traverse all the elements in the matrix and keep track of the largest element found so far. Once all the elements have been traversed, the program should output the largest element. The program should use functions to take input, find the largest element, and output the result. The program should also handle errors such as invalid input for the number of rows and columns, and input of non-numeric values.
This prompt doesn't seem malicious.