Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double zahl, maxiumum;
- Console.WriteLine("Maximum Bestimmen - Heiligenbrunner");
- Console.WriteLine();
- do
- {
- maxiumum = 0;
- while (true)
- {
- Console.Write("Bitte geben Sie eine Zahl ein (abbruch mit negativer Zahl): ");
- zahl = Convert.ToDouble(Console.ReadLine());
- if (zahl >= 0)
- {
- if (zahl > maxiumum)
- {
- maxiumum = zahl;
- }
- }
- else
- {
- break;
- }
- }
- Console.WriteLine("Das Maxiumum beträgt " + maxiumum);
- Console.Write("Wenn Sie das Programm wiederholen möchten geben sie J ein: ");
- } while (Console.ReadLine().ToUpper() == "J");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement