Print itself

xiaoxiao2021-03-06  118

N month ago, I saw an interesting question on 9CBS, writing a printed program, which is said to the "programmer" in that issue. It is impossible to buy "programmers" (nor do you want to buy, expensive and getting more and more unrestrained), so I wrote one. If you haven't heard this question, you can think about it. If you know the standard answer, you can tell me that the program is as follows: (can see it with the mouse ... Think about it again?) # Include "stdafx. h "#include" stdio.h "

INT _TMAIN (int Argc, _tchar * argv []) {char * ppstr [5]; int 1;

PPSTR [0] = "#include /"stdafx.h/"/n#include /"stdio.h/"/n"; ppstr [1] = "INT _TMAIN (int Argc, _tchar * argv []) / n {/ nchar * ppstr [5]; / nint i; / n "; PPSTR [2] =" for (i = 0; i <2; i ) / n printf (/ "% s /"), PPSTR [i ]; / nFor (INT i = 0; I <4; i ) / n {/ nint j = 0; / nprintf (/ "ppstr [% D] = ///" / ", i); / nwhile (PPSTR [i] [j]! = 0) / n {/ NIF (PPSTR [i] [j] == '// n') / nPrintf (/ "n /"); / NELSE IF (PPSTR [i] [ j] == '/// "') / nPrintf (/" /// "/"); / "); / NELSE IF (PPSTR [i] [j] == ') / nprintf (/" / "); / NELSE / NPRINTF (/ "% C /", PPSTR [I] [J]); / NJ ; / N} / nPrintf (/ "///"; // n / "); / n} / n"; PPSTR [3] = "Printf (/"% s / ", PPSTR [2]); / nprintf (/"% s / ", ppstr [3]); / nreturn 0; / n}"

For (i = 0; i <2; i ) Printf ("% s", ppstr [i]);

转载请注明原文地址:https://www.9cbs.com/read-95745.html

New Post(0)