CSCI 103 Spring 2018: Introduction to Programming
In-Class Exercises Set 2
Practice Program on your VM
Guessing game Write a number guessing game that randomly chooses an integer between [0-19] and allows the user to try to guess it. Indicate higher or lower until they guess correctly (and output Win) or stop after 5 unsuccessful guesses and output Lose. Practice using functions by defining and repeatedly calling a function to perform one "turn" of the game at a time and return whether the user guessed the number correctly. The prototype is below:
bool guessAndCheck(int secretNum);
More Arrays, Passing Arrays as Arguments, C-Strings
Which of these do you think will compile?
char name = "Dave"; char name = "Dave"; char name = "Dave"; char name = "Dave";
Lecture 8 - Image Processing
Done on your VM.