Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- double fahr = 100;
- int contador = 0;
- do
- {
- contador++;
- Console.WriteLine("{0} graus Fahrenheit equivale a {1} graus Celcius", fahr, Conversor(fahr).ToString("#.00"));
- fahr--;
- if (contador == 10)
- {
- Console.WriteLine("\n");
- contador = 0;
- }
- } while (fahr != -11);
- Console.ReadKey();
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="f"></param>
- /// <returns></returns>
- public static double Conversor(double f)
- {
- double cel = 0;
- cel = 5.0 / 9.0 * (f - 32.0);
- return cel;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement