/*
 * madlibs.cpp  This program prompts the user to type words 
 * that are filled in to a short story, like the game MadLibs.
 */

#include <iostream>
#include <iomanip>

using std::cout;
using std::cin;
using std::string;
using std::endl;
using std::setprecision;

int main()
{
 string part1 = "Jack and Jill went up the";
 string noun1;
 string part2 = "to fetch a pail of";
 string noun2;
 
 string part3 = "Jack fell down and";
 string verb1;
 string part4 = "his";
 string noun3;
 
 string part5 = "and Jill came";
 string verb2;
 string part6 = "after.";
 
 string part7 = "Jack should really be more";
 string adjective1;
 string part8 = "!";
 
 string part9 = "His insurance premiums jumped from $";
 double number1;
 string part10 =  "to $";
 string part11 = ".";
 
 string part12 = "And really, Jill should be more";
 string part13 = "too.";
 
 string part14 = "Hill climbing can be very";
 string adjective2;
 string part15 = "! :-)";
 
 /* TODO: prompt the user to enter values for noun1, noun2, noun3, verb1, verb2, adjetive1, adjetive2, and number
  * use cin to actually get the input from the user and store the results in the respective variables.
  */
 cout << "Enter a noun:\n";
 cin >> noun1;
 cout << "Enter another noun:\n";
 cin >> noun2;
 cout << "Enter another noun:\n";
 cin >> noun3;
 cout << "Enter a verb:\n";
 cin >> verb1;
 cout << "Enter another verb:\n";
 cin >> verb2;    
 cout << "Enter an adjective:\n";
 cin >> adjective1;
 cout << "Enter another adjective:\n";
 cin >> adjective2;
 cout << "Enter a number:\n";
 cin >> number1;


 cout << part1 << " " << noun1 << " " << part2 << " " << noun2 << '.' << endl;
 
 /* TODO:  the rest of these lines don't space the output correctly,
  * and words are running together.  Fix this.
  */
 
 cout << part3 <<  verb1 <<  part4 <<  noun3 ;

 cout << part5 <<  verb2 <<  part6;
 
 cout << part7 << adjective1 << part8 ;
 
 //TODO  number1 actually represents a dollar amount.  
 //Use the iomanip library to force cout to print two decimal points
 cout << part9 << number1 <<  part10 << number1*2  << part11 ;

 cout<< part12<<  adjective1 <<  part13 ;
 
 cout<< part14 <<  adjective2 << part15 ;
  
  return 0;
}