Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace ConsoleApplication1
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             double euro=0.0, dm=0.0;
  12.             string wahl = "";
  13.  
  14.             Console.WriteLine("Was mˆchten Sie wie umrechnen? W‰hlen Sie bitte die entsprechende Nummer:");
  15.             Console.WriteLine("1 Deutsche Mark --> Äuro");
  16.             Console.WriteLine("2 Äuro --> Deutsche Mark");
  17.             wahl=Console.ReadLine();
  18.  
  19.                         if (wahl == "1")
  20.                         {
  21.                         Console.WriteLine("Bitte geben Sie den DM Betrag ein:");
  22.                         dm = Console.ReadLine();
  23.                         dm = Convert.ToDouble();
  24.                         euro = dm * 1.95583;
  25.                         Console.WriteLine(dm + " DM entsprechen " + euro + " Äuro.");
  26.                         }
  27.  
  28.                         if (wahl == "2")
  29.                         {
  30.                         Console.WriteLine("Bitte geben Sie den Ä Betrag ein:");
  31.                         euro = Console.ReadLine();
  32.                         euro = Convert.ToDouble();
  33.                         dm = euro / 1.95583;
  34.                         Console.WriteLine(euro + " Ä entsprechen" + dm + " DM.");
  35.                         }
  36.  
  37.                  
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement