All pastes #161899 Raw Edit

Tavy's calc

public cpp v1 · immutable
·published 2006-09-05 22:23 UTC
rendered paste body
#include <iostream>#include <string>#include <math.h>using namespace std;int main (){		int a, b, c;	string operand;		cout << "Welcome to Tavy's Retarded Calculator." << endl << "Format is as follows: " << endl;	cout << "A (Operand) B" << endl << "Operand is: + for addition, - for subtraction, / for division, and * for multiplication" << endl;	cout << endl << "Input Value for A: ";	cin >> a;	cout << endl << "Input Operand: ";	cin >> operand;	cout << endl << "Input Value for B: ";	cin >> b;		if (operand == "/")		c = a / b;	else if (operand == "*") 		c = a * b;	else if (operand == "+")		c = a + b;	else if (operand == "-") 		c = a - b;	cout << "The result of " << a << operand << b << " is: " << c << endl;	return 0;	}