1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

finding number of any paragraph and sentence in a text.

Discussion in 'C' started by ldrey, May 22, 2016.

  1. ldrey

    ldrey New Member

    Joined:
    May 22, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Can you help me to write a c program that finds number of any paragraph and sentence in a text.
    I'm new at this and i really need to do this.
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    How far have you got and where are you stuck? Do you understand the requirements?
     
  3. ldrey

    ldrey New Member

    Joined:
    May 22, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I just don't know where to start and even what to do. A simple program that counts paragraphs and sentences will be ok for me could you help.
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Well OK. Could you start by just looping over the input displaying each character plus a couple of words saying what it is, for example given the input "A cat.", you could output the following 7 lines:

    A - Capital letter
    - Space
    C - Capital letter
    a - Lowercase letter
    t - Lowercase letter
    . - Full stop
    End of input
     

Share This Page