Python转C语言
para = "Letting go of a negative habit happens by making one positive choice at a time. " \
"Creating a desired achievement comes about in the same way."
para = para.split()
arr = []
num_a = 0
word_num = 0
word_line = 0
count_line = 0
max_line = 72
for p in para:
if p == 'a':
p = "//"+p+"//"
num_a += 1
word_num += 1
word_line = len(p)
count_line += word_line
arr.append(p)
arr = ' '.join(arr)
print(arr)
输出是
Letting go of //a// negative habit happens by making one positive choice at //a// time. Creating //a// desired achievement comes about in the same way.