Long words

  • 12
  • Locked
The main method's first parameter is file1 and the second is file2. file1 contains words separated by spaces. Write to file2 a comma-separated list of words longer than 6 characters. file2 should not end with a comma. Close the streams. Example output to file2: lengthy,shortened,abbreviation
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Isma
Level 41 , Madrid, Spain
13 January 2021, 16:48
Input (from File1) Alcool television speciality Bottle of wine Pencilcase Output (in the File2) television,speciality,Pencilcase Notice that input words in File1 are separated by spaces AND newlines.
Jurij Thmsn
Level 29 , Flensburg, Germany
21 April 2021, 06:11
thanks for this hint!
Alexandr Semin
Level 23 , Irkutsk, Russian Federation
20 April 2019, 22:14
????
Andrei
Level 41
22 February 2021, 11:57
!!!!
Guadalupe Gagnon
Level 37 , Tampa, United States
21 December 2018, 21:06
Do not remove punctuation marks. if the input is: This costs 1 dollar, but this is 12. The variable is called file1. 110 is a number sleventy. Ariable. Notice the ',' after dollar. This counts as towards the overall length of the word. The output for this should be: dollar,,variable,sleventy.,Ariable.