Boost your Grades with us today!

Allow the user to enter an integer. Compute the number’s square root and store it as an int, then…

Part 1 (5 points) Allow the user to enter an integer. Compute the number’s square root and store it as an int, then print this value (i.e. the int you just computed). Next divide the int result by 2 and print the remainder. Part 2 (5 points) Allow the user to enter an integer and then a decimal (fractional) number. Divide the integer by 5 and print the result. Divide the decimal number by 5 and print the result. Part 3 (10 points)
We have given you a snippet of code for Part 3. This code is SUPPOSED to accept two numbers from the user and then print the result of dividing the first number by the second. Unfortunately it misbehaves, for example it reports that 1 divided by 2 is 0 instead of 0.5. Fix it. (note: There are several possible solutions) Sample Input 16 24 24.0 3 8 Sample Output Part 1: Enter integer: Square Root: 4 Remainder: 0 Part 2: Enter integer: Enter decimal: Integer Division: 4 Decimal Division: 4.8 Part 3: Enter two integer values: 3 divided by 8 is: 0.375

Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!