diff options
Diffstat (limited to 'CST116-Ch6-Debugging')
| -rw-r--r-- | CST116-Ch6-Debugging/CST116 Ch6 pseudo code.txt | 8 | ||||
| -rw-r--r-- | CST116-Ch6-Debugging/CST116 LAB 0 Debugging Chp6.txt | 5 | ||||
| -rw-r--r-- | CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | 8 |
3 files changed, 19 insertions, 2 deletions
diff --git a/CST116-Ch6-Debugging/CST116 Ch6 pseudo code.txt b/CST116-Ch6-Debugging/CST116 Ch6 pseudo code.txt new file mode 100644 index 0000000..a07ef72 --- /dev/null +++ b/CST116-Ch6-Debugging/CST116 Ch6 pseudo code.txt @@ -0,0 +1,8 @@ +Under main +create and set fahrenheit to 0 +create and set celcius to 0 +output "enter temperature in fahrenheit" +input fahrenheit +set celcius ro 5.0/9.0*(fahrenheit-32) +output fahrenheit to "degrees F=" +output celcius to "degrees C"
\ No newline at end of file diff --git a/CST116-Ch6-Debugging/CST116 LAB 0 Debugging Chp6.txt b/CST116-Ch6-Debugging/CST116 LAB 0 Debugging Chp6.txt new file mode 100644 index 0000000..08741ce --- /dev/null +++ b/CST116-Ch6-Debugging/CST116 LAB 0 Debugging Chp6.txt @@ -0,0 +1,5 @@ +Enter temperature in Fahrenheit: 212 +212 degrees F = 100 degrees C + +C:\Users\furyf\OneDrive\Desktop\Homework\CST Homework\Chp6 Lab\CST116-Ch6-Debugging\Debug\CST116-Ch6-Debugging.exe (process 31432) exited with code 0. +Press any key to close this window . . .
\ No newline at end of file diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp index 497e2f8..7734dc5 100644 --- a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp +++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp @@ -1,6 +1,10 @@ /********************************************************************
* File: CST116-Ch6-Debugging.cpp
-*
+* Thomas Trinh
+* CST 116
+* Chp 6
+* Literals, Variable and Constants & I/O Streams
+*
* General Instructions: Complete each step before proceeding to the
* next.
*
@@ -51,7 +55,7 @@ int main() // Breakpoint 1
// Put a breakpoint on the following line
- celcius = 5 / 9 * fahrenheit - 32;
+ celcius = 5.0 / 9.0 * (fahrenheit - 32);
cout << fahrenheit << " degrees F = "
<< celcius << " degrees C" << endl;
|