如何使用一个打印功能在第二行和后续行中使用正确的代码缩进打印所有文本?
ItemsSource="{Binding Source={StaticResource yourViewSource}}"
答案 0 :(得分:2)
您希望避免在字符串常量中使用\[newline]
。
c编译器会为你连接字符串常量,所以你可以这样格式化它:
printf("Program information\n"
"The program reads in the number of judges and the score from each judge.\n"
"Then it calculates the average score without regard to the lowest and\n"
"highest judge score. Finally it prints the results (the highest, the \n"
"lowest and the final average score).\n\n");
答案 1 :(得分:0)
如之前删除的答案中的评论所示,我认为您希望缩进\t
。
它是基本的制表者。
所以喜欢这样:
printf("Program information\nThe program reads in the number of judges and \
the score from each judge.\n\tThen it calculates the average score without \
regard to the lowest and\n\thighest judge score. Finally it prints the \
results (the highest, the \n\tlowest and the final average score).\n\n");