Advertisement
slemiba

L01-04b-Celsius 2 Fahr and Kel

Sep 6th, 2022 (edited)
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp7
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("--- 4. feladat ---");
  14.             Console.WriteLine("Kérek Celsius °C értéket:");
  15.             double Cel = double.Parse(Console.ReadLine());
  16.             double Fah = Cel * 9 / 5 + 32;
  17.             double Kel = Cel + 273.15;
  18.             Console.WriteLine("A megadott érték °F-ben: " + Fah );
  19.             Console.WriteLine("A megadott érték °K-ben: " + Kel);
  20.  
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement