Ввод в консоль только цифр - C#
Формулировка задачи:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
Console.Write("Введiть а : ");
int a = int.Parse(Console.ReadLine());
Console.Write("Введiть b : ");
int b = int.Parse(Console.ReadLine());
Console.Write("Введiть c : ");
int c = int.Parse(Console.ReadLine());
Console.WriteLine(a == -b || a == -c || b == -c);
Console.ReadLine();
}
}Решение задачи: «Ввод в консоль только цифр»
textual
Листинг программы
if(char.IsDigit(key))