DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: If/Else

  1. #1
    Chuck A Guest

    If/Else


    I,m training in c++ and need help with the if / else statements.
    How do I declare two states to have a 10% discount on sales and another two
    states to have a 7% discount on sales.

  2. #2
    Danny Kalev Guest

    Re: If/Else

    if ((state == AL) || (state == MD)
    discount = 10;
    else if ((state == CA) || (state == LA)
    discount = 7;

    Danny
    Chuck A wrote:
    >
    > I,m training in c++ and need help with the if / else statements.
    > How do I declare two states to have a 10% discount on sales and another two
    > states to have a 7% discount on sales.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center