Write a code snippet to declare and accept an integer and calculate the cube value of the integer. The integer should be passed by reference to a function cube(). The function would calculate the result of cubing the integer.

The function prototype to be used is: void cube (int *p);

Sample input-output
Please enter an integer: 2
The cube of integer 2 is 8

You need to post the code you wrote. I (we) don't do your homework for you unless you deposit $1,000.00 USD in my PayPal account.

The odds of someone writing the code for you for free is very slim.... even pros like Ancient Dragon would do it in like 1 min but he will not do it for free... so think about it :)

Post your code, so we can assist you!

I also noticed that you posted this twice.... it's not going to help you very much! So don't post twice!