Function and selection issue in C++
<p>I revised this post. I am new to programming and do not know if the functions are set up correctly or even how to allow the selection of packages. Below is my objective.</p>

<p>I have a class assignment to write a C++ program that will calculate a customers monthly internet bill. It would input a customer name, which package the customer purchased, and how many hours were used. </p>

<p>The Requirements are:</p>

<p>Input validation: to be sure the user only selects package A B or C. Display and error message if the wrong package is entered.</p>

<p>Calculation:</p>

<p>PackA for 9.95 a month with 10 hours of acess. 2 bucks per additional hour.
PackB for 14.95 a month with 20 hours of acess. 1 bucks per additional hour.
PackC for 19.95 a month with unlimited acess.</p>

<p>I then have to create the output as a bill.</p>

<p>The code I wrote so far is:</p>

<pre><code>/*
 James Hayek
 CIS 165
 Passaic County Community College
 Program 04
*/


#include &lt;iostream&gt;
#include &lt;iomanip&gt;

using namespace std;

double calcBill(double packageChoosen, double hours, double basePack, char name); // This is the function prototype for calcBill
void dispBill(char packageChoosen, double hours, double basePack, char name, char bill); // This is the function prototype for dispBill


int main()
{
 char packageChoosen;
 double bill;
 char name;
 double hours;
 double basePack;

 cout &lt;&lt; "Welcome To Your Personal Bill Caclculator!\n\n";
 cout &lt;&lt; "Please enter your name: \n";
 cin  &gt;&gt; name;
 cout &lt;&lt; "Please choose your package by entering A, B, or C: \n";
 cin  &gt;&gt; packageChoosen;

 bill = calcBill(name, packageChoosen, hours, basePack); // call function calcBill
 dispBill(name, packageChoosen, hours, basePack, bill); // call function dispBill


 return 0;

} // end main




double calcBill(char packageChoosen, double hours, double basePack, char name) //This is the function for calcBill
{

 if (packageChoosen == 'A' || packageChoosen == 'a' &amp;&amp; hours &lt;= 10)
 {
  bill = 9.95;
 }
 else if (packageChoosen == 'A' || packageChoosen == 'a' &amp;&amp; hours &gt; 10)
 {
  bill = 9.95 + (2 * hours);
 } 

 else
 {
  cout &lt;&lt; "Please choose an apropriate package";

 }


 return bill;

} // end main



void dispBill(double packA, double packB, double packC, char name, char bill) //This is the function for dispBill
{



 cout &lt;&lt; bill;


 return;

} // end dispBill
</code></pre>

<p>I am not really sure where to begin, any advice would be greatly appreciated.</p>
