aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-10-04 14:39:28 -0700
committerAnibal LopezBonilla <[email protected]>2022-10-04 14:39:28 -0700
commit725594f1081e557129629b59f5ec71757581671f (patch)
tree90db077410057e8927cbf49021addc61a7c22c0c
parenttest (diff)
downloadcst116-ch6-debugging-buzzerbeaterclutch-725594f1081e557129629b59f5ec71757581671f.tar.xz
cst116-ch6-debugging-buzzerbeaterclutch-725594f1081e557129629b59f5ec71757581671f.zip
Added comments
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Lopez-Bonilla.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Lopez-Bonilla.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Lopez-Bonilla.cpp
index a1b960c..47e05b7 100644
--- a/CST116-Ch6-Debugging/CST116-Ch6-Lopez-Bonilla.cpp
+++ b/CST116-Ch6-Debugging/CST116-Ch6-Lopez-Bonilla.cpp
@@ -43,16 +43,21 @@ using std::endl;
int main()
{
+ //Variables are created
float fahrenheit = 0;
float celcius = 0;
+
+ //User input a temperature in fahrenheit
cout << "Enter temperature in Fahrenheit: ";
cin >> fahrenheit;
// Breakpoint 1
// Put a breakpoint on the following line
+ //Calculation
celcius = 5.0 / 9.0 * (fahrenheit - 32);
+ //Conversion Results
cout << fahrenheit << " degrees F = "
<< celcius << " degrees C" << endl;