Block letters

Do I have to type cout for everything? can u provide me the answer ? i am stuck…

Hey there @py7015275746! Welcome to the Codecademy forums :grinning:

I am unsure if you meant to type cout as in std::cout, but if you did than you only have totype that when you want something displayed on the console. If I remember correctly there are a good few lessons that don’t use it.

If you meant to type:

Than yes this is best practice when learning to code, as when you do it a good many times it begins to become memory.
In fact a few topics came up recently about copy/pasting:

We can’t give the solutions to an exercise, but if you want to post a link to the lesson you are on and what you are struggling with, we can help point you right direction.

1 Like

wah ok…

this is crazy u going to type out cout everything for block letters…there got to be another way…lol…

Yeah, Python’s print().

1 Like

Could you give me a specific example of what you mean by block letters?

Do you mean like making a large letter out of a bunch of small ones?:

#include <iostream>

int main() {
  std::cout << "  aaa  \n a   a \n aaaaa \n a   a \n a   a\n";
                
}

This gives you:

  aaa
 a   a
 aaaaa
 a   a
 a   a

exacty…imagine I have to type it all just like the tutorial says…crazy man…

Check this out:

It makes it a bit easier.

If you assign a string with the * symbol and you use /n to make newlines than you can create a multiline string:

#include <iostream>

int main() {
  const char *string = "  aaa  \n"        
                       " a   a \n"
                       " aaaaa \n"
                       " a   a \n"
                       " a   a \n";

  std::cout << string;
}
1 Like

To be fair, functionally, how many times is it important to layout text like this?