Need this code written before a couple hours from now...

The exercise is :
"
One stormy night, as Dionne worked diligently on her CSC 126 labs, a bolt of lightning struck the house. The power surge raced through her computer, causing it to emit a strange glow. A strange new program appeared on her computer called "psychic". Dionne told all her friends that this program was capable of predicting the future. If they wanted to use the program, they could download it from her web site.
To try the computer psychic network free, go to www.cs.csi.cuny.edu/~zelikovi/csc126/psychic2.exe . (Example of how your program should work)
Your objective: To write a program that will predict the future. Use the main function to do the following…
Prompt the user for his/her lucky number. This number will be largely ignored by the rest of the program (it’s only for show, for the user’s sake).

Prompt the user for which life topic he/she wants a prediction. Based on the user's response call one of three functions. Suggestions are love, finance, and school, but you may use three of your own choosing. Use a nested if-else statement to control which function is called.
Each function will…
Call the rand function
Use the value generated by the rand function and modulus operator as the selector expression in a switch statement.
Create a SWITCH that will print out the predictions.
Allow for five different predictions per function.
Finally, prompt the user to see if they want another prediction. Keep executing the program until the user tells you to quit. Make sure that you code for all possible user inputs, including wrong ones. "


Can someone please write this out for me as it's due in a couple hours and I still have to do something else. Thank you, much appreciated
OP wrote:
Can someone please write this out for me

Yes, someone certainly can, but doing so is a waste of time.

I think you're going to fail this one.
This makes predicting the future very easy. I think this program will fulfill your needs.
1
2
3
4
5
6
7
8
9
#include <iostream>

int main()
{
	int deservedGrade = 0;
	std::cout << "The most important event in your near future is:\n";
	std::cout << "failing your practical because you did not plan your activities and/or were too lazy\n";
	return deservedGrade;
}
Last edited on
Topic archived. No new replies allowed.