Untitled

 avatar
unknown
plain_text
4 years ago
1.5 kB
4
Indexable
#include <iostream>
#include <string>
#include <cmath>
using namespace std;

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){
	cout << "\nSelect what you want!" << endl;
	cout << "Geometry - 'G'\nArithmetic - 'A'" << endl;
	cout << "Enter the selected character - ";
	
}

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 - ";
	
}


int main(){
	
	char first_step, first_geometry_step, first_arithmetic_step, back;
	
	startProgram();
	
	firstStep(first_step);
	cin >> first_step;
	
	if(first_step == 'G'){
		startProgram();
	}else if(first_step == 'A'){
		firstArithmeticStep(first_arithmetic_step);
	}else{
		cout << "Wrong character!" << endl;
	}
	
	cin >> first_arithmetic_step;
	
	
	
	return 0;
}
Editor is loading...