about | help | code help+videos | done | prefs |
For this problem, do not use any string methods. You must solve the problem only using string assignment statements and/or concatenation. Write a method that returns a string that has 'repeat' copies of numbers that count by 1 from 'low' to 'high'. You must use the exact formatting shown, with spaces between numbers and symbols as shown, but with no space at the end of the string. You cannot put that extra space at the end and then remove it with substring because no string methods are allowed! Look carefully at the test data to make sure you understand your goal. Also note that when 'repeat' is 1, there will be no ":" separating the repeating counts because there will be only one count. Also, repeat>=1 in all cases and low<=high in all cases. ccc1FunnyNums(4, 6, 2) → "4 5 6 : 4 5 6" ccc1FunnyNums(1, 5, 1) → "1 2 3 4 5" ccc1FunnyNums(-5, -3, 3) → "-5 -4 -3 : -5 -4 -3 : -5 -4 -3" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 270
Copyright Nick Parlante 2017 - privacy