Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0
  •   was successfully added to your cart.
  • Home
  • Buy proxies
  • Extra features
  • Help
  • Contact
  • Login
  • 50% OFF
    BUY NOW!
    50
    PROXIES
    $19
    --------------------
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    $29
    $49
    $109
    $179
    $299
    --------------------
    --------------------
    --------------------
    --------------------
    --------------------
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    100
    200
    500
    1,000
    2,000
    TOP SELLER
    BEST VALUE
    For All Private Proxies!

My calculator is complete but I realized my teacher asked for this one last thing.

‘After the first operation is completed, the program will read another operator and uses the result of the previous operation as the first value for the next operation.’

This is my code so far. I just want to know how to do this so this is no longer a problem in the future. (I want the program to be to keep adding numbers until x is pressed)

#include <iostream> // iostream #include <ctype.h>    // #include ctype.h use this if using isdigit in the code below using namespace std; int main () {      char    Digit;     int        Answer;     char    Op;     bool    ValidNum;     bool    ValidOp;      StartCalc:     int     Num1 = 0;     int     Num2 = 0;         cout << "This program will store 2 numbers and calculate the result." << endl;             //    Enter a number     for (int i = 0; i < 2; ++i) {        int temp;        do    {            cout << "Enter a number and then press ENTER: ";            temp    = 0; // this is set to 0 inside the loop so if the loop messes up then it resets again            ValidNum    = true;            Digit        = cin.get ();            while (Digit != '\n') // while digit does not equal a enter button            {                if (isdigit (Digit))    // is that character a digit? // isdigit tests if the character is a certain type of character                    temp = (temp * 10) + (Digit - '0'); // digit in this case is the ones place if you were to enter a number bigger than 9                // so if input of 1 then ((0) * 10) + (('1') - '0')                // if input of 21 ((0) * 10) + (('2') - '0'); (first) this makes it 2.                // then ((2) * 10) + (('1') - '0'); now its 21                // third, wait there is a third character, that third character is newline aka enter.                // that newline (\n) or third character is what breaks the while loop.                else                    ValidNum = false;                Digit = cin.get ();            }            if (!ValidNum)                cout << "Not valid, try again" << endl;        }        while (!ValidNum);        if (i == 0) {            Num1 = temp; // stores temp as num1            cout << "Finished with number " << Num1 << endl;        }        if (i == 1) {            Num2 = temp; // when running the second time it stores temp as num2            cout << "Finished with number " << Num2 << endl;        }        // this is baiscally array but not one, since i cant use arrays in this project I compromised.     }             //    Enter an operator  + - * / C X             //    if it is not a valid operator             //            tell the user and ask for another one      do    {         cout << "Please input a operator (+, -, *, /, C, X) and press Enter: ";         Op = cin.get(); // this gets the op         switch (Op)             {             case '+': Answer = Num1 + Num2; break;             case '-': Answer = Num1 - Num2; break;             case '*': Answer = Num1 * Num2; break;             case '/': Answer = Num1 / Num2; break;             case 'c': // dont type break, this will allow c and C to have the same command // try using system("CLS");             case 'C': cout << "Clearing the calculator " << endl; cin.get();  goto StartCalc;// that cin.get accounts for the enter button since cin.get acounts for any input, without it the loop will start over and account the enter that is pressed. this replaces the first input to a zero rather and skips to ask for the second number.// goto reroutes the program to start from the label again, which is startcalc in this case.            // when the user types c, the program is supposed to start from the beginning again until porgram is terminated with x.             case 'x':              case 'X': cout << "Terminating Program" << endl; exit(0);                         ValidOp = true; // my teacher set this up, idk why we would use this instead of exit                         break;             default:                         ValidOp = false; // i use this to clear the calc, what does false do                         cout << "Not valid, try again, please enter +, -, *, /, 'c' or 'x' as operator. " << endl;                        break;             }        cout << "The result is: " << Answer << endl;             NewA = Answer;           } while (!ValidOp);        return 0;     } 

✓ Extra quality

ExtraProxies brings the best proxy quality for you with our private and reliable proxies

✓ Extra anonymity

Top level of anonymity and 100% safe proxies – this is what you get with every proxy package

✓ Extra speed

1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!

50 proxies

$19/month

50% DISCOUNT!
$0.38 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

100 proxies

$29/month

50% DISCOUNT!
$0.29 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

200 proxies

$49/month

50% DISCOUNT!
$0.25 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

500 proxies

$109/month

50% DISCOUNT!
$0.22 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

1,000 proxies

$179/month

50% DISCOUNT!
$0.18 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

2,000 proxies

$299/month

50% DISCOUNT!
$0.15 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

USA proxy location

We offer premium quality USA private proxies – the most essential proxies you can ever want from USA

100% anonymous

Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies

Unlimited bandwidth

Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!

Superfast speed

Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!

99,9% servers uptime

Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems

No usage restrictions

You have freedom to use your proxies with every software, browser or website you want without restrictions

Perfect for SEO

We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies

Big discounts

Buy more proxies and get better price – we offer various proxy packages with great deals and discounts

Premium support

We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!

Satisfaction guarantee

24/7 premium support, free proxy activation and 100% safe payments! Best reliability private proxies for your needs!

Best Proxy Packs

  • 2,000 Private Proxies $600.00 $299.00 / month
  • 1,000 Private Proxies $360.00 $179.00 / month

Quick Links

  • More information
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Like And Follow Us


Copyright ExtraProxies.com | All Rights Reserved.
  • Checkout
  • Contact
  • Help
  • Home
  • My Account
  • My Cart
  • News
  • Privacy Policy
  • Proxy features
  • Proxy packs
  • Terms and Conditions
Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0 items