Write a program that prints out the chains for the numbers


Write a program that prints out the chains for the numbers within a range that the user specifies. The length of each chain should be printed at the end of the chain.

First, write a function hailstone() that contains a while loop that prints out a single chain and keeps track of how long it is. Each step of the while should move the current value to the next step.

Then, imbed a call to your hailstone function inside a for loop to print the chains from 10 to 20. Remember to use range.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program that prints out the chains for the numbers
Reference No:- TGS0111217

Expected delivery within 24 Hours