A
arnuld
hai,
its me again ;-)
problem: read a sequence of words from input. use /quit/ as a word
that terminates the input.
1.) print the words in the order they were entered. dont print a word
twice.
2.) modify the programme to sort the words before printing the.
actually i did not undertsand what exactly Stroustrup is talking about.
based on my understanding of the problem i think for 1st point he wants
the following to happen when programme runs:
---------------------------------------------------------------------
[arnuld@localhost cpp]$ ./a.out
we
are
the
champions
quit
-------- writing input --------
we
are
the
champions
[arnuld@localhost cpp]$
-------------------------------------------------------------------------
& for 2nd point he wants:
-----------------------------------------------------------------------
[arnuld@localhost cpp]$ ./a.out
we
are
the
champions
quit
-------- writing input --------
are
champions
the
we
[arnuld@localhost cpp]$
-----------------------------------------------------------------------
am i right? or he wants the "sequence of words" in one single line?
(actually i wrote the code that produced the previous 2 outputs, i am
writing C++ programmes
its me again ;-)
problem: read a sequence of words from input. use /quit/ as a word
that terminates the input.
1.) print the words in the order they were entered. dont print a word
twice.
2.) modify the programme to sort the words before printing the.
actually i did not undertsand what exactly Stroustrup is talking about.
based on my understanding of the problem i think for 1st point he wants
the following to happen when programme runs:
---------------------------------------------------------------------
[arnuld@localhost cpp]$ ./a.out
we
are
the
champions
quit
-------- writing input --------
we
are
the
champions
[arnuld@localhost cpp]$
-------------------------------------------------------------------------
& for 2nd point he wants:
-----------------------------------------------------------------------
[arnuld@localhost cpp]$ ./a.out
we
are
the
champions
quit
-------- writing input --------
are
champions
the
we
[arnuld@localhost cpp]$
-----------------------------------------------------------------------
am i right? or he wants the "sequence of words" in one single line?
(actually i wrote the code that produced the previous 2 outputs, i am
writing C++ programmes