We have to count the 3 letter,4letter and 5letter words from a file and print the number of 3 letter,4letter and 5letter words. Delimiter is space,tab,hifen.Also we should not consider the line in the file after we encounter # in that line.(ie after # we should not consider the portion of line)
RE: We have to count the 3 letter,4letter and 5letter words from a file and print the number of 3 letter...
hi use fscanf(....) to read the string calculate length using strlen function and increment the counter for respective words. we will have to take care of #.
RE: We have to count the 3 letter,4letter and 5letter ...
Dim str As StringDim sr As New System.IO.StreamReader( c:/temp.txt ) str sr.ReadToEnd Dim ar() As String str.Split( ) For i As Integer 0 To ar.Length - 1 If (ar(i).Length 3) Then MsgBox(ar(i)) End If Next
RE: We have to count the 3 letter,4letter and 5letter words from a file and print the number of 3 letter,4letter and 5letter words. Delimiter is space,tab,hifen.Also we should not consider the line in the file after we encounter # in that line.(ie after #