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
4 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]4 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
Write an if/else statement that compares the value of the variables soldYesterday and soldToday, and based upon that comparison
jenyasd209 [6]

Answer:

if(soldYesterday > soldToday){

salesTrend = -1;

} else if(soldToday > soldYesterday){

salesTrend = 1;

}

Explanation:

The if/else statement is more explicit. The first if condition check if soldYesterday is greater than soldToday, if true, then -1 is assigned to salesTrend.

Else if soldToday is greater than soldYesterday, if true, then 1 is assigned to salesTrend.

7 0
3 years ago
Betty is developing a machine learning algorithm that looks at vast amount of data collected over 100 years and checks for relat
wolverine [178]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Betty is developing a machine learning algorithm that looks at a vast amount of data that is collected over 100 years, and She also wants to check the relationship among variables such as humidity, temperature, and rainfall in the given data.

So, the correct answer to this question is b. She is developing an association machine learning algorithm.

Because the association tells the relationship between variables. She used the association to find the relationship among variables such as humidity, temperature,  and rainfall.

While the other options are not correct because:

Regression is used to find out the cause and effect relationship between dependent and independent variables. Big data is the biggest field of data analysis, so this option does not best suit this context. Classification is used to classify data, or organizing data into their related group. While clustering is the task of dividing the population into a number of groups such that populations in the same groups are more similar to other populations in the same group than those in other groups. so these are all incorrect options to this question except the "b" option i.e association.

5 0
3 years ago
What is empowerment technology?
rosijanka [135]
It the use of technological devices such mobile phones and computer devices to help retain and locate information.
3 0
3 years ago
With what for a human may a heatsink in the computer be compared? a crispy lettuce salad an ice cold drink of water a sizzling s
Marysya12 [62]

Answer: I'd say an ice cold drink

7 0
4 years ago
Can anybody answer these please hurry
lina2011 [118]
Answer:
All of the above

Explanation:
Their size was very HUGE; While the computers were very EXPENSIVE to operate and used a great proportion of ELECTRICITY it caused the computers to generate a lot of HEAT which would cause the MALFUNCTIONS.
3 0
3 years ago
Other questions:
  • How do rubrics increase learning?
    15·2 answers
  • You have an old photograph that you want to incorporate in a brochure for your antique business. To convert the photo into digit
    9·2 answers
  • How do i end my current plan that i never signed up for, the basic one it charged me $24
    11·2 answers
  • A network administrator manages a network with 75 servers. At least twenty of those servers are approaching end of life but the
    8·1 answer
  • In the context of wireless signal propagation, the phenomenon that occurs when an electromagnetic wave encounters an obstruction
    14·1 answer
  • User can use ______ commands to search for and correct words in a document
    13·1 answer
  • Though most of the content on this social network is uploaded by amateurs, many companies offer streaming video content related
    10·1 answer
  • The operating system (OS) of an information system contains the software that executes the critical functions of the information
    6·1 answer
  • NEED HELP! BRAINLIEST FOR WHOEVER ANSWERS CORRECTLY FIRST!!!
    14·1 answer
  • Which of the following is an example of effective nonverbal communication?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!