Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace ConsoleApplication2
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. StreamWriter txtFile = new StreamWriter(@"D:/brojevi.txt");
  15. int n = int.Parse(Console.ReadLine());
  16. for (int i = 1; i <= n; i++)
  17. {
  18. txtFile.WriteLine("{0}", i);
  19. }
  20.  
  21. txtFile.Close();
  22. }
  23.  
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement