** On paper portion. Points: 20 points total, 10 points for #1, 10 points for #2 Last Name: First Name: Section (start time of your class): 1) Run the algorithm. Use the indicated algorithm to answer each question. Show your work. No credit if you don't show your work. 1a) Use selection sort to sort the numbers -1, 2, 4, 0, -2, 3, 1 1b) Encrypt the message "farewell all" using the caesar cipher and password 5. 1c) Convert the hexadecimal number D2 to decimal. 1d) Determine if the number 79 is prime. 2) Be the computer. For each, keep track of the values of all the variables as the code runs - as we did in class. 2a) loops. // code int x=2, i=0, total=0; while (x != 0) { i++; total += x; if (x % 2 == 0) x = x / 2; else x = 2*(x - 1); if (i >= 10) break; } // variable values. // // i: // // x: // // total: // 2b) functions. // code int f1(int x, int y) { int temp = x; x = y; y = temp; return f2(x,y); } int f2(int z, int w) { int temp = w; w = z; z = temp; return w; } int main() { int x=1, y=2, z=3; x = f1(y, z); y = f2(x, z); } // variable values. // // x in main: // // y in main: // // z in main: // // temp in f1: // // x in f1: // // y in f1: // // temp in f2: // // z in f2: // // w in f2; 2c) arrays. // code char msg[10] = "hello"; int i; for(i=0; i<5; i++) { msg[i] = msg[i] + 1; } for(i=0; i<4; i++) { msg[i] = msg[i+1]; } // variable values. // // i: // // msg: //