This repository has been archived on 2020-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
ibz/software/1_sem/string_length/string_length/LengthCounter.cs

30 lines
796 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace string_length
{
static class LengthCounter
{
public static void CountStringLength(string input)
{
if (input.Length <= 5 && input.Length > 0)
{ Console.WriteLine("1-5"); }
else if (input.Length >= 6 && input.Length <= 15)
{
Console.WriteLine("6-15");
}
else if (input.Length > 16)
{
Console.WriteLine("16+");
}
else
{
Console.WriteLine("Ungültig");
}
}
}
}