fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. double x =3;
  8. double y =4;
  9. double z;
  10. Console.WriteLine("Test:Vertauschen sie den Inhalt zweier Variablen und Dokumentieren Sie");
  11.  
  12.  
  13.  
  14. z = x;
  15. Console.WriteLine("1.Zwischenspeicherung");
  16. x = y;//y auf x übertragen
  17. Console.WriteLine("2.x ist jetzt y");
  18. y = z;//x auf y übertragten
  19. Console.WriteLine("x ist jetzt:");
  20. Console.WriteLine(x);
  21. Console.WriteLine("y ist jetz:");
  22. Console.WriteLine(y);
  23.  
  24. }
  25. }
Success #stdin #stdout 0.04s 23920KB
stdin
Standard input is empty
stdout
Test:Vertauschen sie den Inhalt zweier Variablen und Dokumentieren Sie
1.Zwischenspeicherung
2.x ist jetzt y
x ist jetzt:
4
y ist jetz:
3