title: Multiple conditions in C++ if statement
body: <p>I am very new to the concept of programming in C++. I am wanting to have a multi condition if statement using the <code>||</code> (or) and the <code>&amp;&amp;</code> (and) in one statement. When I ask my college professor about it. She told it was possible and then insulted my limited knowledge on the subject. All examples I have access to show a multi &amp;&amp; statement and only one showing the <code>||</code>. It does not show them being used together. I would like to learn how to get the line working. I will attach the code I have. The problem area is the last bit of coding.</p>
  <pre><code># include &lt;iostream&gt;
  # include &lt;cstring&gt;
  
  using namespace std;
  
  main()
  {
      
      const int maximumHours = 774;
      char customerPackage;
      double hoursUsed = 0,
             packageA = 9.95,
             packageB = 14.95,
             packageC = 19.95,
             overPackageA = 2.00,
             overPackageB = 1.00,
             overTime = 0,
             amountDue = 0,
             excessCharged = 0;
      
      cout &lt;&lt; &quot;Please enter the customer's package: &quot;;
      cin &gt;&gt; customerPackage;
      
      switch (customerPackage)
      {
          case 'a' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
                  cin &gt;&gt; hoursUsed;
              break;
          
          case 'A' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
                  cin &gt;&gt; hoursUsed;
              break;
          
          case 'b' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
                  cin &gt;&gt; hoursUsed;
              break;
          
          case 'B' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
                  cin &gt;&gt; hoursUsed;
              break;
            
          case 'c' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
                  cin &gt;&gt; hoursUsed;
              break;
          
          case 'C' :
              cout &lt;&lt; &quot;Please enter the number of hours used: &quot;;
              cin &gt;&gt; hoursUsed;
              break;        
          default: cout &lt;&lt; &quot;Error.&quot; 
              &lt;&lt; &quot; Please enter the customer's purchased package: &quot;;
          cin &gt;&gt; customerPackage;
      }    
              
      if ( customerPackage ='a' || customerPackage ='A' &amp;&amp; hoursUsed &gt;= 10)           
          amountDue = packageA;
          else
              overTime = packageA - hoursUsed;
              excessCharged = overTime * overPackageA;
              amountDue = packageA + excessCharged;
  }
  </code></pre>