Question: C++ Part 1 Allow the user to enter an integer. Compute the number's cube (x3) and store it as an int, then print this value

C++C++ Part 1 Allow the user to enter an integer. Compute thenumber's cube (x3) and store it as an int, then print this

Part 1 Allow the user to enter an integer. Compute the number's cube (x3) and store it as an int, then print this value (i.e. the int you just computed). Next divide the int result by 3 and print the remainder. Part 2 Allow the user to enter an integer and then a decimal (fractional) number. Divide the integer by 6 and print the result. Divide the decimal number by 6 and print the result. Sample Input 5 27 27.0 Sample Output Part 1: Enter integer: 5 Cubed: 125 Remainder: 2 Part 2: Enter integer: 27 Enter decimal: 27.0 Integer division: 4 Decimal division: 4.5 4 1 #include 2 #include 3 using namespace std; 5 int main() { //PART 1 //Allow the user to enter an integer. 9 1/ Compute the number's cube and store it as an int, then print this value (i.e. the int you just computed). //Next divide the int result by 3 and print the remainder. 6 7 8 000 10 11 12 13 14 15 16 17 18 19 } //PART 2 - Allow the user to enter an integer and a decimal number. 1/Divide the integer by 6 and print the result. //Divide the decimal by 6 and print the result. const int DIVISOR = 6; return a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!