Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Shalini_CSG_CodeTest
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Write a program to count occurrence of each character in the string //use question as given string //Builtin array functions and LINQ are not allowed. Console.WriteLine("Start here..."); string inputString = "Write a program to count occurence of each character in the string"; while (inputString.Length > 0) { int count = 0; for (int i = 0; i < inputString.Length; i++) { if (inputString[0] == inputString[i]) { count++; } } Console.WriteLine("count of" + " " + inputString[0] + "=" + count); inputString = inputString.Replace(inputString[0].ToString(), string.Empty); } Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
internal access specifier
a1
an attempt at making a usable code thing (failed lol)
mo3dal
aa
Triple DES
Math 10.5 (Added simult 4x4)
6
Roman Numbers, Sorting through IComparer
ElaineBrown**