I am an intermediate programmer and i tried to solve the following programme but with no success the programme is a simple text analyzer that read an input file and cumpute the occurence and percentage of each similar word .for example lets consider the following input file.

"The for structure totals the elements of the array one row at the time. The outer for structure begins by setting row of the array to 0."

the analysis of the programme shold be the following:

Word///////////////// Frequency ////////////// %
the///////////// 6 ///////////// 22.25%
for//////////// 2 //////////// 7.41%
structure///////// 2 /////////// 7.41%
totals /////////// 1 ////////// 3.70%
elements /////// 1 ///////// 3.70%
of ////// 2 //////// 7.41%
Array//////// 2 ////// 7.41%
one//////// 1 //////// 3.70%
row/////////// 2 //////// 7.41%
at/////////// 1 ////// 3.70%
time/////////// 1 ///// 3.70%
outer ////////// 1 //// 3.70%
begins /////// 1 /// 3.70%
by ////// 1 // 3.70%
setting ///// 1 ///// 3.70%
to ///// 1 ///// 3.70 %
0 //// 1 //// 3.70%

Total words////////////////////////// 27