Write a function in c++ that reads a positive integer value


Write a function in c++ that reads a positive integer value, and computes the following sequence:
If the number is even, halve it; if it's odd,multiply by 3 and add 1 Repeat this process until the value is 1, printing out each value.Finally print out how many of these operations you performed?

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Write a function in c++ that reads a positive integer value
Reference No:- TGS0120559

Expected delivery within 24 Hours