{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Project3_S10 - green = 60 Hint Generate a random integer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CmpE 102 Project 3 – Spring 2010 Write a program that randomly chooses among three different colors for displaying text on the screen. Use a loop to display 20 lines of text, each with a randomly chosen color. The probabilities for each color are to be as follows: white = 30%, blue = 10%,
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: green = 60%. Hint: Generate a random integer between 0 and 9. If the resulting integer is in the range 0 to 2, choose white. If the integer equals 3, choose blue. If the integer is in the range 4 to 9, choose green. Due date: Monday, March 22....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online