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
Archy [21]
4 years ago
8

The short-term, 0-24 hours, parking fee, F, at an international airport is given by the following formula:  5, if 0 # h # 3 F5

63int(h11), if3,h#9  6 0 , i f 9 , h # 2 4 where int(h + 1) is the integer value of h + 1. For example, int(3.2) = 3, int(4.8) = 4. Write a program that prompts the user to enter the num- ber of hours a car is parked at the airport and outputs the parking fee.
Computers and Technology
1 answer:
jek_recluse [69]4 years ago
6 0

The following code will program that prompts the user to enter the num- ber of hours a car is parked at the airport and outputs the parking fee.

<u>Explanation:</u>

Code:

#include<iostream>

using namespace std;

int main()

{

float hours;

cout <<"Enter number of hours a car parked at the airport: "; // prompt the user to enter hours.

cin >> hours ; // strong the hours

if (hours > = 0 && hours < =3 ) // if 0 < = h < = 3

cout << "Parking fee: 5"; //printing parking fee is 5.

else if (hours > 3 && hours < = 9)//if 3 < h < = 9

cout<<"Parking fee: "<<6*int(hours);//converting float value to int the multiplying with 6 then printing fee.

else//if 9 < h < = 24

cout<< "Parking fee: 60";// printing parking fee 60.

return 0;

}

You might be interested in
Why the computer is known as versatile and diligent device ? explain.<br>​
Scrat [10]

Answer:

Computer is called versatile and diligent device because it is used in almost all the fields for various purposes and it can perform the task repeatedly without loosing its speed and accuracy for long time.

5 0
2 years ago
There is always this thing that comes out and I can't answer one's question. How do I undo this?
Y_Kistochka [10]
You should enter your email address
8 0
3 years ago
Read 2 more answers
.What is Social Media"?
nadezda [96]

Answer:

Social media is an internet-based form of communication. It facilitates the users the sharing of ideas, thoughts and information, and create web content.

There are many forms of social media, like blogs, photo-sharing sites, virtual words, etc.

8 0
3 years ago
Knowing how to use your learning style to study is not important.
qaws [65]

False. It helps u learn better if u use ur learning style to study

3 0
3 years ago
What is one way programmers notify users of program updates? Email messages Magazine advertisements Public service announcements
Vikki [24]
I believe the answer is email notices
3 0
3 years ago
Other questions:
  • You can use Facebook's live feed tool to broadcast content as you post it
    8·2 answers
  • For some people , alcohol can cause an uncontrollable blank of the eyes , making good vision almost impossible
    5·1 answer
  • Write a program that requires the user to enter two floating-point numbers (num1 and num2) from the keyboard. Multiply them and
    6·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • While using the CLI on a Windows 10 64-bit computer with a single HDD and a single volume, you want to move from the current dir
    15·1 answer
  • What is also known as a visual aid in presentation
    15·1 answer
  • Set methods are also commonly called _____ methods, and get methods are also commonly called _____ methods.
    6·1 answer
  • Please someone helpp
    12·2 answers
  • Write a program to find the sum of first 10 even numbers in qbasic​
    15·1 answer
  • The project objective is the detailed description of the characteristics of the project. True or False?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!