User Story
Create a program which calculates the cube of a number.
Use two separate variable to store your data.
Expected Outcome
The cube of 10 is 1000
Code
First Way:
Integer num = 10;
Integer result = num * num * num;
System.debug('The cube of '+ num + ' is ' + result);
Second Way:
Integer num = 10;
Decimal result = Math.pow(num, 3);
System.debug('The cube of '+ num + ' is ' + result);
Video
Video does not exists.