[CSI] (no subject)
Mikhail Nesterenko
mikhail at cs.kent.edu
Thu Oct 26 11:41:36 EDT 2017
Subject: Re: Line Justification Lab 7
Reply-To:
In-Reply-To: <CAD7TEyFczp+EH987bckOzuuv-i2+cD3=Xxk2vTT03BM+ucLV_w at mail.gmail.com>
>
> I am trying to code the Line justification project and I am a little unsure
> as to what we are supposed to do in certain cases.
>
> What if the user input a string that had more than 2 spaces after a
> punctuation mark (ex. comma, words)? I am assuming we would just leave
> it as is or should we delete the extra spaces so that there are only a max
> of 2?
>
> What if the user input a string that had no spaces after a punctuation mark
> (ex. comma,words)? Do I need to make sure that there are two spaces after
> every punctuation mark before I can start adding single spaces after random
> words?
>
You can assume that a punctuation mark comes after some word and there
is at least one space after it.
However, I do not think it should make a difference in your code since
all you should do is look for a punctuation mark and insert a space
after it.
Thanks,
--
Mikhail
More information about the cs13001
mailing list