[Csharp] class Program {static void Main (string [] args) {Console. writeLine ("Please input your STRING:"); string a = Console. readLine (); char c; char find_c; Console. writeLine ("Please input the CHARACTER in your string:"); find_c = Convert. toChar (Console. readLine (); int count = 0; www.2cto.com for (int I = 0; I <. length; I ++) {c = a [I]; if (c = find_c) // obtain the number of characters in, to traverse the {count ++;} Console. writeLine ("There are total {0} of char '{1}' in your input string. ", count, find_c); int index = 0; int n; // the nth find_c Console. writeLine ("Please input the SEQUENCE of the char '{0}' in your input string:", find_c); n = Convert. toInt32 (Console. readLine (); if (n> count) {Console. writeLine ("Error: The Num must be less than or equal to {0 }. ", count); Console. readKey (); return ;}for (int j = 1; j <= count; j ++) {index =. indexOf (find_c, index); if (j = n) {break;} else {index =. indexOf (find_c, index + 1) ;}} Console. writeLine ("The Index of the No. {0} char '{1}' in your input string is {2 }. ", n, find_c, index); Console. readKey ();}}