Untitled
unknown
plain_text
4 years ago
1.9 kB
3
Indexable
#include <iostream> #include <string> #include <cmath> using namespace std; void startProgram(); void firstStep(char, char, char); void firstGeometryStep(char); void firstArithmeticStep(char); int main(){ char first_step, first_geometry_step, first_arithmetic_step; startProgram(); firstStep(first_step, first_geometry_step, first_arithmetic_step); return 0; } void startProgram(){ cout << "Hello, I'm a smart calculator!" << endl; cout << "I will try to contact you in a language you understand!" << endl; cout << "Please when making a selection enter the character that is in quotation marks!" << endl; cout << "If everything understand we can start!" << endl; } void firstStep(char first_step, char first_geometry_step, char first_arithmetic_step){ cout << "\nSelect what you want!" << endl; cout << "Geometry - 'G'\nArithmetic - 'A'\nGo back - B" << endl; cout << "Enter the selected character - "; cin >> first_step; if(first_step == 'G'){ firstGeometryStep(first_geometry_step); }else if(first_step == 'A'){ firstArithmeticStep(first_arithmetic_step); }else if(first_step == 'B'){ cout << endl; startProgram(); firstStep(first_step, first_geometry_step, first_arithmetic_step); }else{ cout << "Wrong character!" << endl; } } void firstGeometryStep(char first_geometry_step){ cout << "\nSelect what you want!" << endl; cout << "Angle - 'A'\nTriangle - 'T'\nCircular - 'C'\nPolygons - 'P'" << endl; cout << "Enter the selected character - "; cin >> first_geometry_step; } void firstArithmeticStep(char first_arithmetic_step){ cout << "\nSelect what you want!" << endl; cout << "Mathematical operations - 'M'\nTrigonometric table - 'T'\nMeasurement unit converter - 'U'\nEquation - 'E'\nPercent - 'P'\nLogarithm - 'L'" << endl; cout << "Enter the selected character - "; cin >> first_arithmetic_step; }
Editor is loading...