1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Degger [83]
2 years ago
12

Print a message telling a user to press the letterToQuit key numPresses times to quit. End with newline. Ex: If letterToQuit = '

q' and numPresses = 2, print:Press the q key 2 times to quit.Sample program:#include int main(void) { char letterToQuit = '?'; int numPresses = 0; return 0;}
Computers and Technology
1 answer:
LekaFEV [45]2 years ago
3 0

Answer:

#include <stdio.h>

int main(void) {

char letterToQuit = '?';

int numPresses = 0;

printf("Press the %c key %d times to quit ", letterToQuit, numPresses);

return 0;}

Explanation:

in print statement %c is replaced by value of  variable 'letterToQuit'and %d is replaced by value of variable 'numPresses'

You might be interested in
Your task is to create a bash shell script that is able to backup all the C++ program files in your current directory. The algor
Oliga [24]

Answer:

backup() {

 read dirname;

 if [[ whereis . /`$dirname` 2>  sterr.exe]]  

    then

        mkdir  $dirname

 for f in . / *.cpp

 do

    cp f "path_to_dirname"

    echo "file backup complete"

}

backup( )

Explanation:

The bash script above is used to backup C++ source files in a directory to a backup directory which is created if it does not exist, and copy's each .cpp file to backup, then sends a message to declare its completion.

7 0
3 years ago
What is meant by concentration of a solution​
Bad White [126]

Answer:

The concentration of a solution means the amount of solute present in a given or specific amount of solution. (presented in percentage)

For example, the Normal Saline solution normally used for different scientific experiment or so. The saline water has 0.9% of salt (sodium chloride). This is the concentration of solution of salt.

5 0
3 years ago
Read 2 more answers
Care and feeding for computer
o-na [289]
Don’t drop it and charge it regularly
5 0
2 years ago
What is the differnce between ''P4 and 4P''
34kurt
The number and letter are switched. This question needs more context to get a accurate answer.
5 0
2 years ago
Read 2 more answers
Write a complete Java program called Rooter that gets a positive integer called "start" from the user at the command line and th
Nataly_w [17]

Answer:

The program in Java is as follows:

import java.util.*;

import java.lang.Math;

public class Rooter{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int start;

 System.out.print("Start: ");

 start = input.nextInt();

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }

}

}

Explanation:

This declares start as integer

 int start;

This prompts the user for input

 System.out.print("Start: ");

This gets input for start

 start = input.nextInt();

The following is repeated until the user input is valid i.e. positive

<em>  while(start<=0){</em>

<em>      System.out.print("Number must be positive\nStart: ");</em>

<em>      start = input.nextInt();  }</em>

The following while loop prints the square root of each number till 0

<em>  while(start>=0){</em>

<em>      System.out.println(Math.sqrt(start));</em>

<em>      start--;  }</em>

4 0
2 years ago
Other questions:
  • Green field county stadium is planning to conduct a circket match between two teams A and B. A large crowd is expected in the st
    13·1 answer
  • Which is a description of phishing?
    7·1 answer
  • Next, Kim decides to include a diagram of a frog’s life cycle in her presentation. She wants to use an image that is part of a p
    15·2 answers
  • Primary technology skills are skills that are necessary for success in online education
    9·2 answers
  • Having friends who cause you stress can decrease your happiness, which can in turn
    13·2 answers
  • How to print wireless from laptop to samsung printer?
    6·2 answers
  • Fire Tint, Inc., (FTI), applies tint to airplane canopies (front windows) manufactured by other companies. When the canopy manuf
    12·1 answer
  • When calling a function with arguments that should be modified, the __________ of those arguments are passed.
    5·1 answer
  • What is the missing line of code?
    7·2 answers
  • 1. Separate valid and invalid variables:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!