Question: C++ code pls? Assignment Overview This assignment will give you experience on the use of loop and conditional statements. We are going work with the
C++ code pls?
Assignment Overview This assignment will give you experience on the use of loop and conditional statements. We are going work with the juggler sequence httns:/len wikinedia ors/wikiJuggler sequence The juggler sequence is another of the well known sequences similar to the Collatz sequence. It has the following definition: if a is even The L J symbol is the floor function, rounding any floating point value down to an integer. It is not rounding as you would typically define it. It is essentially truncation of the fractional part, leaving the integer part of the floating point number. It returns a floating point number. .floor 123.23) is 123.0 floor(123.999) is 123.0 Some things to note about the juggler sequence: . Every known starting number eventually ends in the value 1. At that point the sequence ends .The numbers can get quite large, so make sure you use the correct type. Even with the correct types you can exceed the size of a long integer if that occurs, you will see some strange results. Why is that? o The cmath library provides a number of useful methods including pow, sqgrt and floor (look them up). Some example sequences are on the Wikipedia page. Project Description/ Specification There are two types of test cases in Mimir. Tests where you can see the result (so you can correct your work if you get the incorrect) and those tests where you only get a Pass/Non-Pass answer without seeing the result, so called hidden cases. You will get a combination of both for all Mimir projects from now on. The reason is that we want you to write code that solves the problem according to the specifications, not just give the "correct" answers back as Mimir provides. Warning: Nonetheless, it is possible to figure out the required answers even on a hidden test case. We require, however, that you write code to solve the problem, not just give back the correct answer. The TAs will check this during grading. The TAs are instructed to give a 0 for any test case that does not solve the problem but only gives back the Mimir required answer. Input Two integers a low value and a high value (in that order) indicating a range. You are to generate the Juggler sequence for every number in that range and report as follows if the high value is strictly less than the low value, output Error and quit o o Output If high is greater than or equal to low, on two separate lines you will print e the sequence of the longest length. You will print the starting number, a space, and the length ethe sequence that generated the largest number. You will print the starting number, a space, and the largest number generated. Deliverables proj02/proj02.cpp . The name of the directory is proj02, the name file you turn in should be exactly proj02.cpp. Just like the lab, you must click on proj02, the directory under "Project 02- juggler ", to submit to Mimir. Not the file, the directory If you develop locally and want to turn it in, see the video this week on submitting a zip file to mimir Notes .The max value that can be represented by a signed int is t 2,147.483.647. You need to use a long which has a max oft 9.223372,036,854.775,807 You need a square root operation for the project. Here you go. . # include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
