Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ExamPractice
- {
- class Program
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- int charsInText = text.Length;
- Console.WriteLine("Броят на символите в текста е: " + charsInText);
- int digitsCount = 0;
- foreach (char ch in text)
- {
- if (Char.IsDigit(ch))
- {
- digitsCount++;
- }
- }
- Console.WriteLine("Броят на цифрите в текста е: " + digitsCount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement