Answer:
The code is witten in Java and given in the explanation section.
Using a Scanner object we receive a the user's input and with the System.out.println we output the variable
Step-by-step explanation:
import java.util.Scanner;
public class VariableOutput{
public static void main (String [] args){
Scanner input = new Scanner(System.in);
System.out.println("Enter an Integer 15 or 40");
int numObjects = input.nextInt();
System.out.println("You entered the number "+numObjects);
}
}