/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/Random/Overview/csharp/range1.cs
21 строка
550 B
Genevieve Warren
Add remarks for core types (#38970)
05 янв 2024, 22:14
Не верифицирован
05 янв 2024, 22:14
71d1377
Код
Авторство
О чём код?
using System; public class Example10 { public static void Main() { // <Snippet15> Random rnd = new Random(); for (int ctr = 1; ctr <= 15; ctr++) { Console.Write("{0,3} ", rnd.Next(-10, 11)); if (ctr % 5 == 0) Console.WriteLine(); } // The example displays output like the following: // -2 -5 -1 -2 10 // -3 6 -4 -8 3 // -7 10 5 -2 4 // </Snippet15> } }