Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp12
- {
- class Program
- {
- public static int FahrToCels(int fahr)
- {
- int cel = (fahr - 32) * 5 / 9;
- return cel;
- }
- static void Main(string[] args)
- {
- int a = 0;
- do
- {
- Console.WriteLine("Skriv in Fahrenheit : ");
- int fahrenheit = int.Parse(Console.ReadLine());
- int celsius = FahrToCels(fahrenheit);
- Console.WriteLine($"det är {celsius} grader varmt");
- if (celsius < 73)
- {
- Console.WriteLine("Its to cold! turn up the heat to reach optimal heat");
- }
- else if (celsius > 77)
- {
- Console.WriteLine("Its to hot to enjoy, please turn down the heat a bit");
- }
- else if (celsius == 75)
- {
- Console.WriteLine("The temperature is now perfect! Please enjoy the sauna.");
- }
- } while (a == 5);
- Console.WriteLine("press any key to continue . . . ");
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement