Name: __________________________ Honor Code Acknowledgment: __________________________ Random Quiz # 6 CPS 08, Spring 1995 February 6, 1995 Problem 1: Four Score (2 points) Rewrite the loop below as a for loop. int k = 1; int sum = 0; Dice die(12); while (k <= num) { sum += die.Roll(); k += 2; } Problem Thumbs up (3 points Complete function DigitSum so that it returns the sum of the digits in its parameter. For example, DigitSum(10598) should evaluate to 23. int DigitSum(int num) // precondition: // postcondition: \end{document}