All pastes #2054126 Raw Edit

Mine

public text v1 · immutable
#2054126 ·published 2011-05-05 07:48 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {


            double grader = 0;
            double tC;
            double tF;


            Console.WriteLine("skriv in ditt värde");


            //det du skriver in ska konverteras och sparas i grader
            grader = Convert.ToDouble(Console.ReadLine());
            // -=-
           // double tF = Convert.ToDouble(Console.ReadLine()); 
          
            string input;

            Console.WriteLine("Skriv tF för Celsius till Fahrenhight och tC för Fahrenhight till Celsius");
            input = Console.ReadLine();
            if (input == "tC")

            {
               
                tC = (grader - 32) * 5 / 9;
                Console.WriteLine(tC);
            }

            else
            
            {
                tF = 9.0/5 * grader + 32;
                Console.WriteLine(tF);
            }

            Console.ReadLine();
            



        }
    }
}