/** Requirements: 1. create a simple calculator to implement simple addition, subtraction, multiplication, division operations. continuous operation */# include <iostream> # include <cstdlib> using namespace STD; Class number {public: Number (double AA = 0 ); void input (double a1 = 0); void calculate (); void main (); Number operator + (number & A1); Number operator-(number & A1 ); number operator * (number & A1); Number operator/(number & A1); friend istream & operator> (istream & input, number & N ); friend ostream & operator <(ostream & output, number & N); Private: Double A ;}; number: Number (double aa) {A = AA;} void Number:: input (double A1) {A = A1;} Number: Operator + (number & A1) {number M; M. A = a + a1.a; return m;} Number: Operator-(number & A1) {number M; M. A = a-a1.a; return m;} Number: Operator * (number & A1) {number M; M. A = A * a1.a; return m;} Number: Operator/(number & A1) {number M; M. A = A/a1.a; return m;} istream & operator> (istream & input, number & N) {input> N. a; return input;} ostream & operator <(ostream & output, number & N) {output <n. a; return output;} void number: Calculate () {number A, B, C; char F; CIN >>> F >> B; if (F = '+') {c = a + B; cout <C;} If (F = '-') {c = A-B; cout <C;} If (F = '*') {c = a * B; cout <C;} If (F = '/') {c = A/B; cout <C;} Main ();} void number: Main () {cout <Endl; cout <"select the operation type: 1. addition, subtraction, multiplication, division, and calculation; 0. exit simple calculator "<Endl; int C; CIN> C; Switch (c) {Case 0: exit (0); Case 1: Calculate (); break; default: cout <"Your selection is incorrect"; break ;}} int main () {number N; N. main ();}