Question: in java PART A: Introduction In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1,11,21, 1211, 111221, 312211, 13112221, 11132132,. To
in java PART A: Introduction "In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1,11,21, 1211, 111221, 312211, 13112221, 11132132,. To generate a member of the sequence from the previous member, read off the digits of the previous member, counting the number of digits in groups of the same digit. For example: 1 is read offas one 1" or 11. 11 is read off as "two ls" or 21 21 is read off as "one 2, then one l" or 1211. 1211 is read off as "one l, one 2, then two ls" or 1 1 1221. 111221 is read off as "three 1s, two 2s, then one 1" or 312211 If we start with any digit d from 0 to 9 then d then the sequence starts as follows d, 1d, 111d, 311d, 13211d, 111312211d, 31131122211d"1 Problem . Write a program that: a. Read a long integer number as an array list b. Apply on this number( list) look-and-say technique to give next sequence of that number. Example if the user enter 3122" then he will get"13112221" Display the result as: 312211=-Look and Say== 13112221Hints: Use enhanced for loop to display the result. c. https//en.wikipedia.org/wiki/Look-and-say sequence, 2016
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
