diff options
| author | Taylor Rogers <[email protected]> | 2022-11-05 12:50:31 -0700 |
|---|---|---|
| committer | Taylor Rogers <[email protected]> | 2022-11-05 12:50:31 -0700 |
| commit | 77fea24fd3caf34d7ca187ff3ba2c92800645e55 (patch) | |
| tree | 4a8ceb52452c55e197920db6dd3e277309ee260e /BlankConsoleLab | |
| parent | Added function declarations (diff) | |
| download | cst116-lab2-taylorrog-77fea24fd3caf34d7ca187ff3ba2c92800645e55.tar.xz cst116-lab2-taylorrog-77fea24fd3caf34d7ca187ff3ba2c92800645e55.zip | |
Added the first two functions
Diffstat (limited to 'BlankConsoleLab')
| -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 |