Здравейте, бихте ли съдействали с едното условие на задачата, свързано с конкатенирането на думите. Успявам със сбора на числата, но не мога да се сетя, какво да изпозлвам, че да ми събира стринговете и да ги разделя с тире. Това е условието -
You are given an integer number n and then n new lines of text: numbers or words (see Problem 6). This time when we have a word we concatenate it with the previous words with a dash - between them. If we have a number we add it to all previous numbers.
- The input starts by the number
n(alone in a line) followed bynlines, each holding a text without a space. - Again all
wordscontain no digits.
Кода ми до момента е този - import java.util.Scanner;public class WordorNumber2 { public static voi - Pastebin.com
Благодаря предварително. 