i want print a statement 5 times
我想要打印5次声明
without using any loop n should be in a line
不使用任何循环n应该在一行
3 个解决方案
#1
7
printf("%s %s %s %s %s",s,s,s,s,s);
#2
1
How about this?
这个怎么样?
printf("%s",s);printf("%s",s);printf("%s",s);printf("%s",s);printf("%s",s);
It's 5 print statements on one line, and an alternative to the others who used a single print statement!
它是一行上的5个打印语句,是使用单个打印语句的其他人的替代品!
#3
0
Like this, you mean ?
像这样,你的意思是?
const char * s = "a statement";
printf("%s %s %s %s %s\n", s, s, s, s, s);
#1
7
printf("%s %s %s %s %s",s,s,s,s,s);
#2
1
How about this?
这个怎么样?
printf("%s",s);printf("%s",s);printf("%s",s);printf("%s",s);printf("%s",s);
It's 5 print statements on one line, and an alternative to the others who used a single print statement!
它是一行上的5个打印语句,是使用单个打印语句的其他人的替代品!
#3
0
Like this, you mean ?
像这样,你的意思是?
const char * s = "a statement";
printf("%s %s %s %s %s\n", s, s, s, s, s);