chapter 9 example 4 - int MaxLetters = GetInteger for(int i...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <stdio.h> #include "genlib.h" #include "strlib.h" #include "simpio.h" #include "random.h" int main() { Randomize() printf("How many words? ") int words = GetInteger() printf("What is the minium amount of letters in the words? ") int MinLetters = GetInteger() printf("What is the maxium amount of letters in the words? ")
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int MaxLetters = GetInteger() for (int i = 0 i < words i++) { int randomCount = RandomInteger(MinLetters,MaxLetters) for (int z = 0 z < randomCount z++) { int randomLetter = RandomInteger(64,90) printf("%c", randomLetter) } printf("\n") } }...
View Full Document

Ask a homework question - tutors are online