All pastes #161914 Raw Edit

Tavy's calc

public cpp v1 · immutable
·published 2006-09-05 22:38 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.\nFormat is as follows:\n";	cout << "A (Operand) B\nOperand is: + for addition, - for subtraction, / for division, and * for multiplication\n";	cout "\nInput Value for A: ";	cin >> a;	cout << "\nInput Operand: ";	cin >> operand;	cout << "\nInput 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 << "\n";	return 0;	}