You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Übung_ZifferSchreiben
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Header
|
|
|
|
|
Console.WriteLine("--Zifferschreiber--");
|
|
|
|
|
|
|
|
|
|
//Deklaration
|
|
|
|
|
String gzahl;
|
|
|
|
|
int zahl;
|
|
|
|
|
|
|
|
|
|
//Eingabe
|
|
|
|
|
Console.Write("Geben Sie eine Zahl ein: ");
|
|
|
|
|
zahl = Convert.ToInt32(Console.ReadLine());
|
|
|
|
|
|
|
|
|
|
//Berechnung
|
|
|
|
|
switch (zahl)
|
|
|
|
|
{
|
|
|
|
|
case 0: gzahl = "Null"; break;
|
|
|
|
|
case 1: gzahl = "Eins"; break;
|
|
|
|
|
case 2: gzahl = "Zwei"; break;
|
|
|
|
|
case 3: gzahl = "Drei"; break;
|
|
|
|
|
case 4: gzahl = "Vier"; break;
|
|
|
|
|
case 5: gzahl = "Fünf"; break;
|
|
|
|
|
case 6: gzahl = "Sechs"; break;
|
|
|
|
|
case 7: gzahl = "Sieben"; break;
|
|
|
|
|
case 8: gzahl = "Acht"; break;
|
|
|
|
|
case 9: gzahl = "Neun"; break;
|
|
|
|
|
default: gzahl = "Keine Gültige Zahl"; break;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
//Ausgabe
|
|
|
|
|
|
|
|
|
|
Console.WriteLine("Zahl : " + gzahl);
|
|
|
|
|
Console.ReadLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|