Advertisement
Guest User

Untitled

a guest
Feb 8th, 2015
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. int betrag;
  13. int[] scheine = new int[] {5, 10, 20, 50, 100, 200, 500};
  14.  
  15. do{
  16. Console.WriteLine("Geldautomat");
  17. Console.WriteLine("===========\n");
  18. Console.Write("Bitte geben Sie den gewünschten Betrag in Euro ein:\t");
  19. betrag = Convert.ToInt32(Console.ReadLine());
  20.  
  21. if (betrag < 4 || betrag > 10000 || betrag % 5 != 0)
  22. {
  23. Console.Clear();
  24. Console.WriteLine("\n\nFalsche Eingabe (groesser als 10000 oder kein vielfaches von 5)!\n\n");
  25. }
  26. }while(betrag < 4 || betrag > 10000 || betrag % 5 != 0);
  27. Console.ReadKey();
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement