Write a C++ program that will ask the user for two positive integers a and b. You may assume that both a and b are in the set { 0, 1, 2, ..., 999} and that a < b.
The user will then be prompted to enter divisors (zero or more). You may assume that all divisors are in the set { 1, 2, 3, ..., 999}. The user will be prompted to add a divisor until the user indicates that they are finished. This will be done by entering -1. You may assume that the user enters from zero to at most four divisors followed by -1 to terminate the list.
Finally, your program should output a matrix with the following elements.
An M in the upper left corner.
The first row, after the M, will contain the divisors in input order.
The first column after the M will contain all integers from a to b-1 in increasing order.
A 1 at row i+1 and column j+1 if the i-th integer is divisible by the j-th divisor, otherwise a 0.
Matrix elements should be separated by a space.
I know how to start.
That would be by posting the code that you currently have (use the "<>" button to format it as source code) and describing the problem that you encounter in your own words. It will make the answers you get so much more useful.