diff options
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 5d97bec..e0fbdb0 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -70,3 +70,19 @@ int main() cin >> Tunit; } + +// Converts Fahrenheit to Celsius +void FtoCfunc(int FtoCval) +{ + FtoCval = (TvalF - 32) * (5 / 9); + TvalC = FtoCval; + cout << TvalC; +} + +// Converts Celsius to Fahrenheit +void CtoFfunc(int CtoFval) +{ + CtoFval = (9 / 5) * TvalC + 32; + CtoFval = TvalF; + cout << TvalF; +}
\ No newline at end of file |