Respuesta :

ijeggs

Answer:

public class Assignment {

   public static void main (String [] args) {

       char letterToQuit;

       int  numPresses;

       letterToQuit = '?';

       numPresses = 2;

       System.out.println("Press the " + letterToQuit +

       " key " + numPresses + " times to quit.");

   }

}

Explanation:

Using the Java Programming Language we implement a simple solution. Firstly you declare and assign values to the two variables needed for the program.

letterToQuit of type char and numPresses of type int We assigned the values '?' and 2 respectively to the variables, then using string concatenation the output Press the ? key 2 times to quit. is displayed with the System.out.println function

The program is an illustration of a sequential program.

What are sequential programs?

Sequential programs are programs that do not require loops and conditional statements

The actual program

The program in Python, where comments are used to explain each line is as follows:

#This gets input for letterToQuit

letterToQuit = input()

#This gets input for numPresses

numPresses = int(input())

#This prints the required output

print("Press the",letterToQuit,"key",str(numPresses),"times to quit")

Read more about sequential programs at:

https://brainly.com/question/17970226