Problem
I am doing a Fahrenheit conversion and vice versa.
All my code works perfectly, but I'm not sure how to make the diagram the teacher wants.
The output is from 0 to 100 degrees Celsius and from 32 to 212 degrees Fahrenheit.
Here is my code:
#include <iostream>
Here is my conclusion:
Farenheit equivalents of Celsius temperatures: Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit 0 32 1 33 2 35 3 37 4 39 5 41 6 42 7 44 8 46 9 48 10 50 ... Celsius equivalents of Farenheit temperatures: Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius 32 0 33 0 34 1 35 1 36 2 37 2 38 3 39 3 40 4 41 5 42 5 ...
Here's what my teacher wants: Celsius from 0 to 100 degrees.
Farenheit equivalents of Celsius temperatures: Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit 0 32 25 77 50 122 1 33 26 78 51 123 2 35 27 80 52 125 3 37 28 82 53 127 4 39 29 84 54 129 5 41 30 86 55 131 6 42 31 87 56 132 7 44 32 89 57 134 8 46 33 91 58 136 9 48 34 93 59 138 10 50 35 95 60 140 ...
And the same for Fahrenheit, but from 32 to 212 degrees ...
I know how to align numbers with words using setw (), but I'm not sure how to make columns.
Any ideas or suggestions would be appreciated!
Decision
Thank you all for your help. I figured this out for a moment.
#include <iostream>
My conclusion:
Farenheit equivalents of Celsius temperatures: Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit Celsius Farenheit 0 32 25 77 50 122 75 167 100 212 1 33 26 78 51 123 76 168 101 213 2 35 27 80 52 125 77 170 102 215 3 37 28 82 53 127 78 172 103 217 4 39 29 84 54 129 79 174 104 219 5 41 30 86 55 131 80 176 105 221 6 42 31 87 56 132 81 177 106 222 7 44 32 89 57 134 82 179 107 224 8 46 33 91 58 136 83 181 108 226 9 48 34 93 59 138 84 183 109 228 10 50 35 95 60 140 85 185 110 230 ... Celsius equivalents of Farenheit temperatures: Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius Fahrenheit Celsius 32 0 77 25 122 50 167 75 212 100 33 0 78 25 123 50 168 75 213 100 34 1 79 26 124 51 169 76 214 101 35 1 80 26 125 51 170 76 215 101 36 2 81 27 126 52 171 77 216 102 37 2 82 27 127 52 172 77 217 102 38 3 83 28 128 53 173 78 218 103 39 3 84 28 129 53 174 78 219 103 40 4 85 29 130 54 175 79 220 104 ...
Blake source share