Week 4: Tuesday --------------- Q1. (50) Input from the user 8 pairs of values. The first value is the id of a job and the second value is that of a machine. The pair signifies that the job can be run on that machine. There can be at most four jobs, numbered from 0 to 3 while there can be at most three machines, numbered 0 to 2. Output a formatted matrix of jobs as rows and machines as columns. If a job can be run on a machine, output the corresponding cell as 1, otherwise output it as 0. Example: If input is 0 0 0 2 2 2 3 0 3 1 0 0 1 1 2 1 output should be 1 0 1 0 1 0 0 1 1 1 1 0 Q2. (50) Input a matrix of size 3x3. For each column, find the sum of the elements in it. Output the matrix such that the columns are re-arranged in the increasing order of their sums. If two columns have the same sum, output them in the order they appeared in the original matrix. Example: If input is 1 4 8 9 2 9 8 6 0 then output should be 4 8 1 2 9 9 6 0 8