aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
diff options
context:
space:
mode:
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;