Advertisement
Guest User

C#

a guest
Mar 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace temp
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9.  
  10. int Farenheit;
  11. double Celsius;
  12. double a;
  13.  
  14. Console.Write("Ange grader i Farenheit : ");
  15. Farenheit = int.Parse(Console.ReadLine());
  16.  
  17. a = (Farenheit - 32);
  18.  
  19. Celsius = a * 5 / 9;
  20.  
  21. // double total = Math.Round(Celsius,1);
  22. // Console.WriteLine(total);
  23.  
  24. Console.WriteLine($"{Celsius:f1}");
  25.  
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement