Write a program that generates 5 rolls of a 6-sided die
(in a loop), prints
out each roll, and finds and prints out their sum after the
loop. Hint: you would
need a variable sum
that you set to zero before the loop
and use to store the running sum of the random numbers.
Write a program that keeps generating rolls of a 6-sided die until they add up to 20 or more. Use a 'while' loop and a sum variable, as in the previous problem. Use 'sum' in the condition of the loop. You don't need a loop counter for this problem.
Send all of your program files to me by e-mail. You may submit the written part (if any) in class or send it together with your problem set. Please send only ONE e-mail with your entire submission, make sure you include everything. Multiple e-mails with your homework may result in a lower grade.