given a string SSSEERRTADEEE write a program to output the following way to given string:S3E2R2T1A1D1E3
Anonymous
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LogicalPractice { class CharsInString { static void Main() { Console.Write("Enter Word : "); string word = Console.ReadLine(); for (var i = 0; i = 0; k--) { if (word[k] == word[i]) check = false; } if (check) { for (var j = i; j < word.Length; j++) { if (word[i] == word[j]) count++; } Console.WriteLine(word[i] + " Occurs at " + count + " places."); } } } } }
Check out your Company Bowl for anonymous work chats.