Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi I need a c++ program for this but please done extremely simply only using ios

ID: 3836455 • Letter: H

Question

Hi I need a c++ program for this but please done extremely simply only using iostream int main etc

One stormy night, as Dionne worked diligently on her Computer Programming labs, a bolt of lightening 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, for a small fee, they could download it from her web site.

Objective - To write a program that will predict the future

Method - 1. Use the main procedure to

Prompt the user for his/her lucky number. Use this number as input to the srand function found in cstdlib

Prompt the user for which life topic he wishes his predictions based.  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.

2. Each function will

Call the rand function

Use value generated by the rand function and modulo division as the selector expression in a switch statement.

The switch statement will print out the predictions.

Allow for five different predictions per function.

3. 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.

Have fun!!

Explanation / Answer

#include <iostream>
#include <cstdlib>
#include <string>
#include <ctime>
using namespace std;
void Input_choice();
void Finance_Status();
void health_Status();
void love_Status();
int main()
{
  
   int INput_Lucky_no;
char x;
   bool playAgain =true;
  
  
  
   cout << "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" << endl;
   cout << "* *" << endl;
   cout << "* Welcome to the Psychic Computer Network. *" << endl;
   cout << "* My name is David, and I will be your psychic computer guide. *" << endl;
   cout << "* *" << endl;
   cout << "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" << endl << endl;
cout << "Please enter your lucky number: ";
cin >> INput_Lucky_no;
   srand(INput_Lucky_no);
cout << endl;
  
Input_choice();
  
  
  
   do//do-while loop as in do you want to read another prediction?
   {
       cout << " Thank you for using the psychic computer network.";
cout << " Would you like me to make another prediction? y for yes or n for no." << endl << endl;
       cout << "Enter here: ";
cin >> x;
  
       if (x == 'y' || x == 'Y')
       {
           cout << endl << endl;
           Input_choice();
       }
  
       else if (x == 'n' || x == 'N')
       {
           playAgain = false;
           break;
       }
  
       else
           cout << " " << x << " is not y, n ,Y or N. Please only enter y, n, Y or N."; //let user know what he/she did wrong
playAgain = true;
  
   } while (playAgain);
  
  
   return 0;
}


void Input_choice (void)
{
char Input_choice;
   bool userfails = true;
   do
   {
cout << "Please enter an "F" for my predictions on your Financial Situation."<< endl;
cout << "Please enter an "L" for my predictions on your Love Life." << endl;
cout << "Please enter an "H" for my predictions on your Health." << endl;
cout << endl;
cout << "Enter here: ";
cin >> Input_choice;
cout << "I am looking into my crystal ball." << endl;
cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" << endl;
if (Input_choice == 'F' || Input_choice == 'f')
{
           Finance_Status();
           userfails = false; //without this the loop will start over again
  
}
  
       else if (Input_choice == 'L' || Input_choice == 'l')
       {
           love_Status();
           userfails = false;//without this the loop will start over again
  
   }
       else if (Input_choice == 'H' || Input_choice == 'h')
       {
           health_Status();
           userfails = false;//without this the loop will start over again
  
       }
       else
       {
           userfails = true;//cant be too safe
       }
   }while (userfails);//repeat loop while user keeps failing
  
}


void Finance_Status(void)
{
int   x = rand() % 5 + 1;
   switch (x)
   {
case 1:
cout << "You will be very rich.";
break;
case 2:
cout << "Times are tough but you will find your way.";
break;
case 3:
cout << "Saving is the key to your success. ";
break;
case 4:
cout << "Invest your money and the profit will be great. ";
break;
case 5:
cout << "You will be very poor. ";
break;
   }
  
  
  
  
  
}


void love_Status(void)
{
int   x = rand() % 5 + 1;
   switch (x)
   {
case 1:
cout << "Be patient, you will find your perfect match.";
break;
case 2:
cout << "Nobody likes you.";
break;
case 3:
cout << "You will have to choose between two.";
break;
case 4:
cout << "You will find love_Status very soon. ";
break;
case 5:
cout << "Your current partner is cheating on you.";
break;
   }
  
  
}

void health_Status(void)
{
int   x = rand() % 5 + 1;
   switch (x)
   {
case 1:
cout << "You will live a long and health_Statusy life";
break;
case 2:
cout << "You need to start going to the gym.";
break;
case 3:
cout << "Eat less junk food and start eating health_Statusy.";
break;
case 4:
cout << "Your health_Status will begin to deter.";
break;
case 5:
cout << "You will die soon";
break;
   }
}