+ 4

[#JARQ] Hey Community!!

Is There Any Similar Function Or Way To Print Some Character Multiple Times In C++ Just Like We Do In Python EX:->>>> print(5*'&') Output----------&&&&& Just Any Method Of Doing That In A Short And Simpler Way. Thanks For Your Time...😊😊

25th Apr 2018, 6:14 PM
™TheChamp921
™TheChamp921 - avatar
4 Respuestas
+ 4
I think this will work: cout << string(5, '&');
25th Apr 2018, 10:43 PM
Zeke Williams
Zeke Williams - avatar
+ 4
yup, Zeke Williams, it works---just tested it in playground.
25th Apr 2018, 10:55 PM
Eric Zatarack
Eric Zatarack - avatar
+ 3
Eric Zatarack nice 😎
25th Apr 2018, 11:04 PM
Zeke Williams
Zeke Williams - avatar
+ 3
Thanks @Zeke This Is Really Going To Help A Lot Cheers Bud!!✋
26th Apr 2018, 12:14 AM
™TheChamp921
™TheChamp921 - avatar