- 1
How to print program
how to print the source code of a program when it is executed . . in different languages. . (my requirement is, when the code get executed or interpreted the source code it self is printed along the desired result. . )
6 ответов
+ 14
+ 8
What do you want the program to do?
+ 6
@kirAn You can't because it contains an input.
+ 1
It's called a quine
https://stackoverflow.com/questions/1479489/can-a-program-output-a-copy-of-itself. .
I found many answers here, but not working as I want. .
+ 1
consider the below code when I run it, it accepts input form user and displays lucky number. besides this I want to print the entire source code of the program at the output console when the code runs.
https://code.sololearn.com/c83rw5ug4n72/?ref=app
0
is it possible if it doesn't have any inputs