Advertisement
BojidarDosev

rabota s file

Oct 28th, 2021
907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 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 ConsoleApp19
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             StreamWriter wr = new StreamWriter("D:\\numbers.txt");
  15.             Random rand = new Random();
  16.             for(int i = 0; i < 10; i++)
  17.             {
  18.                 wr.WriteLine(rand.Next(0, 100));
  19.             }
  20.             wr.Close();
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement