CodePudding user response:
String s="abcd45612, asd";Int characters=0;
Int Numbers=0;
Int symbols=0;
The foreach (char c in s)
{
If ((c & gt;=33 & amp; & C & lt;=47) | | (c & gt;=58 & amp; & C & lt;=64) | | (c & gt;=91 & amp; & C & lt;=96) | | (c & gt;=123 & amp; & C & lt;=126))
Symbols++;
If ((c & gt;=65 & amp; & C & lt;=90) | | (c & gt;=97 & amp; & C & lt;=122))
Characters++;
If (c & gt;=48 & amp; & C & lt;=57)
Numbers++;
}