ECE222(2007Fall)Prog4(RandomWords)

ECE222(2007Fall)Prog4(RandomWords) - Fall 2007 ECE 222...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2007 ECE 222 System Programming Concepts 1 of 2 Lab 4 – Random Words In this lab, each student is to write a prompt-driven program called prog4.c that checks the validity and statistics of randomly created words. Background As you might have learned in biology, biological evolution is based upon the hypothesis that complex structures of high information content (e.g. DNA/RNA) originated from random chemical processes over billions of years. We will simulate this process in this lab by generating words and sentences (and maybe even a book!) by using the pseudo-random number generator rand() . Input The program should prompt the user to input the number of “random words” to be produced (up to 4 billion) and the maximum length of each word (up to 16 letters). Operation Upon execution, the program is to create a random word by combining a random length of randomly generated letters (i.e. use rand() to generate a word length first, then again to generate each of the letters for that word). It is to then check to see if this
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ECE222(2007Fall)Prog4(RandomWords) - Fall 2007 ECE 222...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online