0
(C++) How to make variable vertically?
so I know the text is using \n but for variable I don't know how. anyone knows about this
2 Respostas
0
I don't exactly understand what you mean. Can you show how your output might be or more details about your question?
0
Hi Sia Bapet & CarrieForle ! Good to see you.
Answer to this Q:
If you are talking about
string name = "Atif";
Must print as:
A
t
i
f
Then it is possible.
You can do it by using:
for(int i=0;i<name.size();i++){
cout<<name[i]<<endl;
}
It will do as you need.
If you liked the answer, then do mark it as Best Answer & Follow me for more.
Regards.