Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Aufgabe7
  4. {
  5. class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9.  
  10. Console.WriteLine ("Wilkommen im Freizeitbad!");
  11. Console.WriteLine ();
  12. Console.WriteLine ("Wie viele Erwachsene wollen das Schwimmbad besuchen?");
  13.  
  14. int E = int.Parse(Console.ReadLine());
  15.  
  16. Console.WriteLine("Wie viele Kinder wollen das Schwimmbad besuchen?");
  17.  
  18. int K = int.Parse(Console.ReadLine());
  19.  
  20. Console.WriteLine("Wie lange wollen Sie baden? 1,5 Stunden, 3 Stunden oder 24 Stunden?");
  21. double a = double.Parse(Console.ReadLine());
  22.  
  23. double Preis=1;
  24. if ((a==1.50))
  25. {
  26. double Preis=E*5+K*2.50;
  27. }
  28.  
  29.  
  30. if ((a==3))
  31. {
  32. double Preis=E*5.80+K*2.90;
  33. }
  34.  
  35.  
  36. if ((a==24))
  37. {
  38. double Preis=E*8+K*4;
  39. }
  40.  
  41. Console.WriteLine("Wünschen Sie Zutritt zu der Therme?");
  42.  
  43. Console.ReadKey(true);
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement