Can't Copy and Paste this?

Click here for a copy-and-paste friendly version of this code!

 

//**************************************

//     

//INCLUDE files for :Math Application

//**************************************

//     

None!

 

code:

Can't Copy and Paste this?

Click here for a copy-and-paste friendly version of this code!

 

Terms of Agreement:   

By using this code, you agree to the following terms...   

1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for langauges that allow it) freely and with no charge.   

2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   

3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 

4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.  

//     

#include 

int main()

    {

     int asmd;

     int add1;

     int add2;

     int subtract1;

     int subtract2;

     int multiply1;

     int multiply2;

     int divide1;

     int divide2;

     int dia;

     int quad1;

     int quad2;

     int ang1;

     int ang2;

     int quit;

     cout << " do you want to..." << endl; 

     cout << "1) add" << endl;

     cout << " 2) subtract" << endl; 

     cout << "3) multiply" << endl;

     cout << " 4) divide" << endl; 

     cout << "5) Find out the circumference of a circle," << endl; 

     cout << " 6) Find out the area of a quadralateral," << endl;

     cout << "7) Find out what an angle of a triangle is..." << endl;

     cin >> asmd;

         {

         if (asmd==1)

             {

             cout << "Enter the first number" << endl;

            cin >> add1;

             cout << "Enter the second number" << endl;

             cin >> add2;

             cout << "Your answer is: " << add1+add2 << endl;

             }

             else if(asmd==2)

                 {

                 cout << "Enter the first number" << endl;

                 cin >> subtract1;

                 cout << "Enter the second number" << endl;

                 cin >> subtract2;

                 cout << "Your answer is: " << subtract1-subtract2 << endl;

                 }

                else if(asmd==3)

                     {

                     cout << "Enter the first number" << endl;

                     cin >> multiply1;

                     cout << "Enter the second number" << endl;

                     cin >> multiply2;

                     cout << "Your answer is: " << multiply1*multiply2 << endl;

                     }

                    else if(asmd==4)

                         {

                         cout << "Enter the dividend" << endl;

                         cin >> divide1;

                         cout << "Enter the divisor" << endl;

                         cin >> divide2;

                         cout << "Your answer is: " << divide1/divide2 << endl;

                         }

                        

                         else if(asmd==5)

                             {

                             cout << "Enter the diameter of the circle" << endl;

                             cin >> dia;

                             cout << "Your answer is: " << dia*3.14 << endl;

                             }

                             else if(asmd==6)

                                 {

                                 cout << "Enter the length of the quadrilateral" << endl;

                                 cin >> quad1;

                                 cout << "Enter the width of the quadrilateral" << endl;

                                 cin >> quad2;

                                 cout << "Your answer is: " << quad1*quad2 << endl;

                                 }

                                 else if(asmd==7)

                                     {

                                     cout << "Enter the 1st angle" << endl;

                                     cin >> ang1;

                                     cout << "Enter the 2nd angle" << endl;

                                     cin >> ang2;

                                     cout << "Your answer is: " << 180-(ang1+ang2) << endl;

                                     }

                                     cout << "Press any key and return to quit" << endl;

                                     cin >> quit;

                                     return 0;

                                }

                            }