fork download
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7. Console.WriteLine("Введите число:");
  8. int N = int.Parse(Console.ReadLine());
  9. for (int i = 1; i <= N; i++)
  10. {
  11. Console.Write(i + " ");
  12. }
  13. Console.WriteLine();
  14. }
  15. }
Success #stdin #stdout 0.07s 30088KB
stdin
3
7
stdout
Введите число:
1 2 3