0

How to print your name 10times efficiently without using a loop ?

27th May 2017, 10:12 AM
shaffaf marakkar
shaffaf marakkar - avatar
4 Respuestas
+ 4
use it 10 times or use recursion cout<<"your name"; why you think loop is not effecient for only 10 time. even some time loop is more efficient than recursion
27th May 2017, 10:25 AM
MR Programmer
MR Programmer - avatar
+ 2
well technically you're using an loop there in python and c++ there is no other way then writing it out 10 times when you don't want to use a loop
27th May 2017, 10:22 AM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar
0
by definition of a loop yes, I do think it is implemented like a loop internally in python
27th May 2017, 11:42 AM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar
0
its actually an interview question so what i understood is we can print 10 times without a loop by condition statement like "if" or by even by recursion.
28th May 2017, 11:48 AM
shaffaf marakkar
shaffaf marakkar - avatar