0

i am starter in c/c++
i need to convert this:

cout <<"  "<<ch1<<ch2 <<" "<<ch1<<ch3 <<"   " <<ch0<<" "<<ch1 <<"  "<<ch1 <<ch4 <<"  "<<ch1<<"   "<<ch3<<ch5<<"  "<<ch0 <<" " <<ch2<<ch3<<" "<<ch1<<ch5<<ch0<<" "<<ch1<<ch4 <<"\n";

in printf, but i dont know how to do it.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by thines01
0

Are those characters or something else?
If they are chars, you could:

printf("   %c%c %c%c", ch1,ch2,ch3,ch4);
/*placing a %c everywhere you need a character and adding that reference to the char at the end of the paraeter list*/
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.