diff options
author | 2024-03-09 00:29:25 +0600 | |
---|---|---|
committer | 2024-03-09 00:29:25 +0600 | |
commit | c237e0c92ecee53ed7352b83c69da9aabafcd26b (patch) | |
tree | d0d92184c70b590beef20065b0af0e9d7de5bb29 /headers/readElementState.cpp | |
parent | 6e2a2938c18ace9d12bc9135bba61bef20de44e4 (diff) | |
download | entropy-calc-c237e0c92ecee53ed7352b83c69da9aabafcd26b.tar.gz entropy-calc-c237e0c92ecee53ed7352b83c69da9aabafcd26b.zip |
calculation of total heat fixed
Diffstat (limited to '')
-rw-r--r-- | headers/readElementState.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/headers/readElementState.cpp b/headers/readElementState.cpp new file mode 100644 index 0000000..494594a --- /dev/null +++ b/headers/readElementState.cpp @@ -0,0 +1,26 @@ +#include <iostream> +using namespace std; + +string readElementState() +{ + string state; + cout << "1. Solid\n2. Liquid\n3. Gas" << endl; + int choice; + cin >> choice; + switch (choice) + { + case 1: + state = "Solid"; + break; + case 2: + state = "Liquid"; + break; + case 3: + state = "Gas"; + break; + default: + cout << "Invalid choice" << endl; + break; + } + return state; +} |