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]
3 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]3 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
What are five most important areas of the animal industry that involve science and technology?
BigorU [14]

Animal Health, Breeding, Meat Sanitation/Preservation, Feeding, Waste Disposal

3 0
3 years ago
_____ allows you to use the internet for making phone calls instead of leasing traditional telephone lines from the phone compan
TEA [102]
Using a browser would help in doing that.
3 0
3 years ago
How should you dress for a phone interview
artcher [175]
If you're doing an interview via phone I wouldn't suppose you would need to get dressed into anything specific. If it's going to be a video call, then you should at least wear something presentable  that the camera will see (that means you don't have to wear pants). 
Sorry, if you're looking for some specific answer then I can't help you. This question just kinda throws common sense out there and it's just your job to use it. 
5 0
3 years ago
Read 2 more answers
The Yuba College Library would like a program to calculate patron fines for overdue books. Fines are determined as follows: Pape
mestny [16]

Answer:

Explanation:

The following Python code creates all of the necessary functions in order to request and validate all of the inputs from the user. Once everything is entered and validated it calculates the total fee and outputs it to the user. Also calls the entire class at the end using a test variable...

class Customer:

   library_card = 0

   patrons_name = ""

   patrons_address = ""

   type_of_book = ""

   book_title = ""

   days_overdue = 0

   fee = 0.0

   book_list = ['paperback regular', 'paperback best seller', 'magazine', 'hardcover']

   def __init__(self):

       self.library_card = self.get_library_card()

       self.patrons_address = input("Patron's Address: ")

       self.book_title = input("Book Title: ")

       self.type_of_book = self.get_type_of_book()

       self.days_overdue = float(self.get_days_overdue())

       self.calculate_total()

       print("Your total Fee is: " + str(self.fee))

   def get_library_card(self):

       library_card = int(input("Enter 4-digit library card number: "))

       if (type(library_card) == type(0)) and (len(str(library_card)) == 4):

           return library_card

       else:

           print("Invalid Card number:")

           self.get_library_card()

   def get_type_of_book(self):

       type_of_book = input("Type of Book 1-4: ")

       if (int(type_of_book) > 0) and (int(type_of_book) <= 4):

           return int(type_of_book)

       else:

           print("Invalid Type")

           self.get_type_of_book()

   def get_days_overdue(self):

       days_overdue = input("Number of Days Overdue: ")

       if int(days_overdue) >= 0:

           return days_overdue

       else:

           print("Invalid number of days")

           self.get_days_overdue()

   def calculate_total(self):

       if self.type_of_book == 1:

           self.fee = 0.20 * self.days_overdue

           if self.fee > 8:

               self.fee = 8

       elif self.type_of_book == 2:

           self.fee = 0.50 * self.days_overdue

           if self.fee > 15:

               self.fee = 15

       elif self.type_of_book == 3:

           self.fee = 0.25 * self.days_overdue

           if self.fee > 5:

               self.fee = 5

       else:

           self.fee = 0.30 * self.days_overdue

           if self.fee > 23:

               self.fee = 23

test = Customer()

5 0
2 years ago
Please select the word from the list that best fits the definition
Tasya [4]

Answer:

d

Explanation:

because it is

3 0
3 years ago
Read 2 more answers
Other questions:
  • Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
    9·1 answer
  • The benefits of flextime include:
    11·2 answers
  • Which extension is appropriate for Word document templates?
    10·2 answers
  • William found out that someone used his report on american culture without his permission. what is william a victim of?
    11·1 answer
  • Gary has to complete a form before enrolling into an online course. A few of the fields require Gary to respond with either a "Y
    7·2 answers
  • For current events, what type of sources would we use to learn about them?
    14·1 answer
  • What are the tyoe of typical application of mainframe computer<br>​
    6·1 answer
  • 19 dollar fortnite giftcard who wants it
    15·2 answers
  • Write a nested loop to set values as follows: [0] [1] [2] [3] [4] [0] 1 2 3 4 5 [1] 1 2 3 4 5 [2] 1 2 3 4 5 [3] 1 2 3 4 5
    12·1 answer
  • Brainly Question
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!