what I mean is, if anyone tell me how's that? or show me the codes for better improvements


Check this out!
I just want to improve this codes
Code:
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    int  left, right;   // Operands
    char oper;          // Operator
    int  result;        // Resulting value
    
    while (cin >> left >> oper >> right) {
        switch (oper) {
            case '+': result = left + right; 
                      break;
            case '-': result = left - right; 
                      break;
            case '*': result = left * right; 
                      break;
            case '/': result = left / right; 
                      break;
            default : cout << "Bad operator '" << oper << "'" << endl;
                      continue;  // Start next loop iteration.
        }
        cout << result << endl << endl;
    }

    return 0;
}

Last edited by shabbir; 8Mar2009 at 10:37.. Reason: Code blocks