Help with starting this program so confused?

closed account (4wRjE3v7)
The classic toy the Magic 8 Ball make predictions about the future if you asked it a yes/no question. Write a C++ program that simulates a magic 8 ball (you need 5 different prediction statements). Your program should choose which prediction to make using a switch statement based on a randomly generated integer. To generate a random integer between 1 and 5, you need the following code:


#include <time.h>
put this line at the top of your program file right after you include <iostream> and before the namespace line

srand(time(NULL));


rand() % 5 + 1;


What would be the input for for the user?? I can't ask them to enter a number.

Thanks in advance and feel free to give me tips.
Any line. You just trow it away anyway: 8Ball doesn't care what are you asking.
Topic archived. No new replies allowed.