题解 | #添加逗号#
添加逗号
https://www.nowcoder.com/practice/f51c317e745649c0900996fd3f683aed
#include <stdio.h>
#include <string.h>
int main() {
char s[200];
int m;
scanf("%s",s);
for(int j=0;j<strlen(s);j++)
{
printf("%c",s[j]);
if(((strlen(s)-j-1)%3)==0&&(j!=strlen(s)-1))
printf(",");
}
}
360集团公司氛围 374人发布