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
hjlf
3 years ago
10

You have been hired by Beta Airlines to help them with their flight prices. You are to create a 10 x 10 2D array (also called a

matrix) that holds the prices of their domestic flights between Atlanta and Hawaii. Your program should fill the matrix with random values between $99 and $1999 and allow a user to enter a price that matches their preferred cost for the flight. You should then process the 2D array and return whether or not a price in the array matches their requested price (exactly matches).
Computers and Technology
1 answer:
AveGali [126]3 years ago
4 0

Answer:

See explaination

Explanation:

//Array to store prices

INT PRICE[10][10]

//Loop through 2d array

FOR I FROM 0 TO 10

FOR J FROM 0 TO 10

//Populate a random int

PRICE[I][J] = RANDOM_INT(99,1999)

PRINT(PRICE[I][J]+" ")

PRINT()

//Prompt user for desired price

COST = READ_INPUT('Please enter your desired flight price: ')

//Variable to store if a match is found

MATCH = FALSE

//Loop through all ints in price

FOR I FROM 0 TO 10

FOR J FROM 0 TO 10

//Compare price with Cost

IF PRICE[I][J]==COST

MATCH = TRUE

BREAK

//Check if match is true

IF MATCH = TRUE

PRINT('A flight was found for that price, have a safe trip!')

ELSE

PRINT('No flight was found for that price, please try a new price.')

You might be interested in
Which wireless device does the manager most likely have before being offered the upgrade by her supervisor?
uranmaximum [27]

Answer:

Smartphone

Explanation:

6 0
3 years ago
Read 2 more answers
Sam has sent Sally an email. Sally wants to answer him without manually typing in his email address. Which email option should s
tiny-mole [99]

Answer:

reply

Explanation:

hit the reply button to do that

3 0
3 years ago
Read 2 more answers
An intranet is a way for a company or organization to protect copyrighted and other important information?
Korolek [52]

If this is true or false, it would be true

Hope this helps

-AaronWiseIsBae

4 0
3 years ago
Read 2 more answers
50 Points! 25 Points Each! Please help ASAP! Will mark brainliest! See attached image.
monitta

Answer:

I can't see the image

Explanation:

please put image up there

6 0
3 years ago
Read 2 more answers
The practice of texting is most popular and what age group
Diano4ka-milaya [45]
Mostly teenagers and young adults (ages 14-21) text the most.
4 0
3 years ago
Read 2 more answers
Other questions:
  • He would like to get rid of the graph. What will accomplish
    8·1 answer
  • Please help me I just bought a camera and I really wanna shoot in manual mode but I have like the basics down Shutter speed is l
    9·1 answer
  • Tara referred to various information sources while writing her research paper. How can she acknowledge these sources in her docu
    8·1 answer
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • The collection of all possible vulnerabilities that could provide unauthorized access to computer resources is called the:
    12·1 answer
  • Which option best describes the cheapest way to file your federal income taxes?
    5·1 answer
  • What information medium is used to access information from the Internet in the form of HTML pages?
    12·1 answer
  • Which of the following is a correct group scope type in AD, windows server 2016?
    6·1 answer
  • Why is data processing done in computer?​
    14·1 answer
  • Write is an I.P.O cycle? Describe with figure​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!