Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void DoMath(int startValue, int step, int rows)
- {
- float celsius = startValue;
- Console.WriteLine("Degrees Celsius Degrees Fahrenheit");
- for (int i = 0; i < rows; ++i)
- {
- Console.WriteLine("{0,-20:F2} {1:F2}", celsius, 9.0f / 5 * celsius + 32);
- celsius += step;
- }
- }
- // static void DoMath(int startValue, int step, int rows)
- // {
- // Console.WriteLine("Degrees Celsius Degrees Fahrenheit");
- // for (int celsius = startValue; celsius < rows*step+startValue; celsius+=step)
- // {
- // Console.WriteLine("{0,-20:F2} {1:F2}", celsius, 9.0f / 5 * celsius + 32);
- // }
- // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement