Thread: how to count sentences and words?

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    7

    Unhappy how to count sentences and words?

    Hi there
    i got an assignment ..the pregram i have to do concerns allowing the user to enter a paragraph(char array).
    it should then count the number of words in the sentecne and list them . eg.
    if the user entered this.......Hi i am Ray.
    it should do this-> Word1: hi
    word2: i
    word3: am
    word4: Ray
    it also shold tell the user how much sentences they were.eg.

    the number of senteces were: 4(depends on how many sentences)

    I am kindly asking for some assistance...if possible and example of a source cods to do this.

    thank you
    take car.
    bye

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    247
    If your kindly asking then why not attempt it yourself and post some code, as we will not complete your homework assignments for you. Seems pretty self explanatory though and not to hard...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C String Problem: Not reading end of string
    By sedavis4 in forum C Programming
    Replies: 5
    Last Post: 11-17-2008, 10:29 PM
  2. Trying to count numbers in file
    By ammochck21 in forum C++ Programming
    Replies: 25
    Last Post: 11-17-2006, 12:32 PM
  3. how to extract words from a string
    By panfilero in forum C Programming
    Replies: 7
    Last Post: 11-04-2005, 08:06 AM
  4. help concering counting of words in one sentc..
    By Ray Thompson in forum C Programming
    Replies: 1
    Last Post: 11-11-2002, 07:55 PM
  5. random selection of words from a text file
    By archie in forum C++ Programming
    Replies: 0
    Last Post: 03-02-2002, 12:59 AM