vc++6.0重复输出一串文字
那位大佬给写个重复输出100遍的 我爱编程跪求
#include <stdio.h>
int main()
[此贴子已经被作者于2021-10-28 19:42编辑过]
[此贴子已经被作者于2021-10-28 19:42编辑过]
2021-10-28 19:41
程序代码:#include <stdio.h>
static int idx;
#define c_string "c language yyds!"
#define __V_PRINT printf("%03d:%s\n", ++idx, c_string)
#define V_PRINT(st) st;st;st;st;st;st;st;st;st;st;
int main(int argc, char *argv[])
{
V_PRINT(V_PRINT(__V_PRINT));
return 0;
}[此贴子已经被作者于2021-10-28 20:15编辑过]
2021-10-28 20:05
程序代码:#include <stdio.h>
int main(void)
{
char *s = "我爱编程";
for (int i = 0; i < 100; ++i)
printf("%s\n", s);
return 0;
}
2021-10-28 20:42