[try Beta version]
Not logged in

 
What does this mean?

Apr 5, 2013 at 5:18am
Hello,

What does this sentence mean?

Rewrite the Hello, world! program so that a newline occurs everywhere that whitespace
is allowed in the program.

Apr 5, 2013 at 5:21am
closed account (3CXz8vqX)
O.o whut!?

Okay that's darn confusing. Show me the code.
Apr 5, 2013 at 5:42am
I think it means what it says.

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
int
main
(
)
{
std::cout
<<
"Hello, world!"
;
}


Apr 5, 2013 at 5:53am
Strangely enough I have heard/red that sentence before. You don't happen to learn c++ from a book called C++ How to program by D&D?
Last edited on Apr 5, 2013 at 5:54am
Apr 5, 2013 at 6:14am
The book is Accelerated C++.
Apr 5, 2013 at 6:23am
I found out I have to make as many whitespaces as possible. The answer given by a guy above, was correct, but it is possible to get even more whitespaces.
Thank you all
Apr 5, 2013 at 6:29am
The answer given by a guy above, was correct, but it is possible to get even more whitespaces.


I suppose whitespace is allowed in std :: cout. =/
Apr 5, 2013 at 6:40am
I finished it.
Here is what I did!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>

int 
main
(
)
{
std
::
cout
<<
"Hello, world!"
<< 
std
::
endl;
system
("pause");
return 0;
}
Topic archived. No new replies allowed.