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
True or False? At any point in time, an open file has a current file pointer indicating the place where the next read or write o
mr_godi [17]

Answer:

True is the correct answer for the above question.

Explanation:

  • When any document file is opened then every point has some particular address. so there is a pointer which states that where the read operation and the write operation is going on.
  • When any person writes any program to read a file or write a file then there is a need for some variable that is pointed for the reading and the write operation.
  • The document which is used for the write data or read data is also designed and maintained by some software.
  • Hence we can say that there are needs of some variable that point the operation of the file and it is also stated from the above question. Hence the above question statement is a true statement.
5 0
3 years ago
Why does the IPv6 format use letters and numbers?
Iteru [2.4K]

Answer:

c is the response hope it helps

7 0
3 years ago
Which of the following statements is true of a cookie? a. A cookie can create copies of itself and spread to other networks to e
Ilya [14]

Answer: D.

Data about user preferences and activity is captured and stored under a cookie on a company’s Web server.

Explanation: The most common and best-known technology for user tracking is the use of cookies. Other known online website tracking tools are tracking pixels (or pixel tags), web beacons (or ultrasound beacons), and browser fingerprinting (or digital fingerprinting), amongst others.

a cookie will contain a string of text that contains information about the browser. To work, a cookie does not need to know where you are from, it only needs to remember your browser. Some Web sites do use cookies to store more personal information about you.

8 0
3 years ago
Define the four basic operation of a computer ​
Alexeev081 [22]

Answer:

input, output, processing, and storage.

Explanation:

input - the transfer of information into the system. ( ex: what you type on a keyboard. )

output -  the presentation of information to the user ( example is the screen. What type of display is presented...?)

processing - obtaining  information based on what you you searched ( What search results you get after putting in the input)

Storage - Storing or saving information into files.

6 0
3 years ago
How do you create a algorithm?
aksik [14]
Make sure that each box has an arrow going to it or leading from it, if it needs one. Select “Insert,” then “Shapes,” and choose the Text Box option: Page 2 [Algorithm how-to procedure] 2 Drag the cursor across the document to customize the size of the text box. Click inside the box to begin typing.
brainliest pls
6 0
3 years ago
Read 2 more answers
Other questions:
  • epic poem - long narrative poem about heroic deeds about pharrell williams of the happy song please help i need the right answer
    11·1 answer
  • Why do we need to send emails
    12·1 answer
  • Why are specification for food processing tool,equipmentand untensils necessary?​
    8·1 answer
  • What is WEB 1.0 to WEB3.0
    11·1 answer
  • Although designed to support remote dial-in access to a corporate network, what service below is commonly used with 802.1x port
    12·1 answer
  • When a diaphragm contracts, a person is<br>Exhaling<br>Inhaling​
    12·2 answers
  • Write a function findWithinThreshold that identifies the elements of a given array that are inside a threshold value. Takes the
    13·1 answer
  • Read the argument below and determine the underlying principle that was used to come to the conclusion presented: It is recommen
    5·1 answer
  • How to make a project using PID and thermacouple
    11·1 answer
  • Write a short-essay discussing your own stand on social media usage for students.​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!