Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp27
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write($"Введите количество: ");
- string userInput = Console.ReadLine();
- int value;
- int i = 1;
- if (int.TryParse(userInput,out value))
- {
- while (i <= value)
- {
- Console.WriteLine($"Текущее значение счетчика: {i}");
- i++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment