aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
diff options
context:
space:
mode:
authorEvan <[email protected]>2022-10-03 20:18:16 -0700
committerEvan <[email protected]>2022-10-03 20:18:16 -0700
commit701183cdef1e4f9c86f749d71cf7654db1b9a7e1 (patch)
tree66672f63fd1977131b3530bd4bd71cd827a46328 /CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
parentremove 2nd temp (diff)
downloadcst116-ch6-debugging-evanmihm-701183cdef1e4f9c86f749d71cf7654db1b9a7e1.tar.xz
cst116-ch6-debugging-evanmihm-701183cdef1e4f9c86f749d71cf7654db1b9a7e1.zip
added 1st run of pseudo codeHEADmain
Diffstat (limited to 'CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp')
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
index f877062..0a94e0d 100644
--- a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
+++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
@@ -43,17 +43,22 @@ using std::endl;
int main()
{
+ //defines the terms fahrenheit and celcius
float fahrenheit = 0;
float celcius = 0;
+ //requires user input to set a temperature
cout << "Enter temperature in Fahrenheit: ";
cin >> fahrenheit;
// Breakpoint 1
// Put a breakpoint on the following line
+
+ //this is the equation to convert fahrenheit to celcius
celcius = (float)(5.0 / 9.0) * (fahrenheit - 32);
+ //displays the converted temperature in celcius
cout << fahrenheit << " degrees in F = " \
<< celcius << " degrees in C" << endl;