Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. /*
  2. * Created by SharpDevelop.
  3. * User: 10.A-I
  4. * Date: 2018.12.17.
  5. * Time: 8:13
  6. *
  7. * To change this template use Tools | Options | Coding | Edit Standard Headers.
  8. */
  9. using System;
  10. using System.IO;
  11.  
  12. namespace nagyarnold1217
  13. {
  14. class Program
  15. {
  16. public static void Main(string[] args)
  17. {
  18. using(StreamReader olvas= new StreamReader("inttomb1.txt")){
  19. int[] fileolvasas;
  20. int i;
  21. i=0;
  22. fileolvasas= new int[10];
  23. for (i = 0; i < fileolvasas.Length; i++) {
  24. fileolvasas[i] = Convert.ToInt32(olvas.ReadLine());
  25. }
  26. Array.Sort(fileolvasas);
  27. Console.WriteLine("Helyes sorrendbe");
  28. using(StreamWriter iras= new StreamWriter("forditott.txt")){
  29. for (i = 0; i < fileolvasas.Length; i++) {
  30. Console.WriteLine(fileolvasas[i]);
  31. iras.WriteLine("Helyes sorrendben");
  32. iras.WriteLine(fileolvasas[i]);
  33. }
  34. }
  35.  
  36.  
  37. Console.ReadKey(true);
  38. }
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement