Tag: 选框

如何输出小于选框标志大小的选取字符串?

所以我的代码接受一串字母,然后以符号方式输出该字符串,符号大小为5.例如,如果我想输出“Hello World!”,则输出为: [Hello] [ello ] [llo W] [lo Wo] [o Wor] [ Worl] [World] [orld!] [rld! ] [ld! H] [d! He] [! Hel] [ Hell] 但问题是,如果有一串字母长度为8且字幕标志的大小为10,那么我只想在字幕标志中显示一次字符串。 因此,如果字符串的大小小于指示的选框标记,则只显示一次字符串。 例如: Input: Activist (the string that I want to output in a sign) 10 (the length of the sign) Output: [Activist ] 注意在选框标记中仍然有10个空格,它所做的只是简单地输出一次字符串。 这是我的代码。 如果有指示,我已经让它运行了不止一次: #include #include void […]