BojidarDosev

rabota s file

Oct 28th, 2021
710
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data