This question was created from Zybooks Activity 1.13.1
Question
This question was created from Zybooks Activity 1.13.1
Need the code for last part in java. This is as far in the code I have gotten: import java.util.Scanner; public class OutputWithVars { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int userNum;//allocates memory to the variable userNum System.out.println(“Enter integer: “);//This prompts the user to enter an integer, I entered 4 userNum = scnr.nextInt();//This stores the integer in the allocated memory System.out.println(“You entered: “+userNum);//Prints on the screen the value entered System.out.println(userNum+” squared is “+ (userNum*userNum));//Prints on the screen the square value System.out.println(“And “+userNum+” cubed is “+(userNum*userNum*userNum)+”!!”);//Prints on the screeen the cubed value
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
![](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_320,h_80/http://academicheroes.com/wp-content/uploads/2018/09/order_now.png)