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
ipn [44]
3 years ago
7

An array of integers named parkingTickets has been declared and initialized to the number of parking tickets given out by the ci

ty police each day since the beginning of the current year. (Thus, the first element of the array contains the number of tickets given on January 1; the last element contains the number of tickets given today.) A variable named mostTickets has been declared, along with a variable k. Without using any additional variables, write some code that results in mostTickets containing the largest value found in parkingTickets.
Computers and Technology
1 answer:
Sedaia [141]3 years ago
6 0

Answer:

Following code will store the largest value in array parkingTickets in the variable mostTickets

mostTickets = parkingTickets[0];

for(int k = 0; k<parkingTickets.length; k++)

{

if(parkingTickets[i]>mostTickets)

{

 mostTickets = parkingTickets[i];

}

}

Explanation:

In the above code segment, initially the number of tickets at first index is assumed as largest value of tickets in array.

Then using a for loop each value in the array parkingTickets is compared with the current mostTickets value.

If the compared value in parkingTickets array is larger than the current mostTickets value. Then that value is assigned to mostTickets.

This process is repeated for all elements in array.

Thus after looping through each element of array the largest value in array will get stored in mostTickets variable.  

You might be interested in
Choose a different well-known company that you know of, and describe its direct and indirect competitors. Describe at least 2 di
geniusboy [140]
Nondirect competition is the variance between vendors whose products or services are not the same but that could gratify the consumer need
Lets take exampl of microsoft corporation
The indirect competitors are WHOLE FOODS and WAL-MART
Direct competitors sells the product or services that are same
the direct competitors are Apple, Google, HP, IBM
hope it helps
6 0
3 years ago
Read 2 more answers
​________ is the scientific​ collection, examination,​ authentication, preservation, and analysis of data held on or retrieved f
ikadub [295]

Answer:

Computer forensics

Explanation:

Computer forensics

8 0
3 years ago
Add me on Pokemon go, my trainer code is 5584 3300 5313
evablogger [386]

Answer:

no want it

Explanation:

7 0
3 years ago
Create a website for an online movie rental store, using HTML (and any other client technologies) and PHP. The website should in
FromTheMoon [43]

Answer:

HTML and PHP code is given below using 10 movie selections

Explanation:

movierentalstore.php:-

<html>

<head>

<title> Online movie rent store </title>

 

</head>

<body bgcolor="blue" alink="white " vlink="white " link="white">

<br>

<hr size="5" color="white">

<center><font face="Monotype corsiva" size="25" color="yellow"> @@ Movies available for rent right now @@ </font></center>

<font face="times new roman" size=6 color="white">

<ol type="1">

<li> Batman $40 * Cast :- Michael Keaton , Jack Nicholson , Kim Basinger / Robert Wuhl *

</li>

<li> Godzilla 2019 $30 * Cast :- Kyle Chandler, Vera Farmiga, Millie Bobby Brown * </li>

<li> Wonder Woman $50</li>

<li> Terminator $10</li>

<li> Avengers : End Game $20</li>

<li> Harry Potter $30</li>

<li> Annabelle $20</li>

<li> hustlers $10</li>

<li> Joker $50</li>

<li> The Lion king $15</li>

 

</ol>

</font>

<a href="renting.php" alink="white"> Click here to rent the movie ... </a>

<br>

<a href="review.php" alink="white"> Click here to review the movie ... </a>

</body>

</html>

review.php :-

<html>

<head>

<title> Reviewing Page </title>

</head>

<body bgcolor="green" > <hr size="5" color="white">

 

<h1><center><font face="Monotype corsiva" size="25" color="yellow"> Review movie </center></font> </h1> <hr size="5" color="white">

<font size="6" face="times new roman" color="yellow">

<form method="GET">

<label>Select movie</label>

<select name="movie1">

<option value="1" > batman</option>

<option value="2" > godzilla</option>

<option value="3" > wonder woman </option>

<option value="4" > terminator</option>

<option value="5" > avengers</option>

<option value="6" > Harry potter</option>

<option value="7" > Anabelle</option>

<option value="8" > Hustlers</option>

<option value="9" > Joker</option>

<option value="10" > The lion king</option>

<br>

</select>

<br><br>

Username :- <input type="text" name="name1" required="" > </input>

<br><br>

Review :- <input type="text" name="review" required="" > </input>

<br><br>

<label>Select rating</label>

<select name="rating">

<option value="1" > 1</option>

<option value="2" > 2</option>

<option value="3" > 3 </option>

<option value="4" > 4</option>

<option value="5" > 5</option>

<br>

 

</select>

 

<input type="submit" name="submit" required="" value="Submit">

<input type="reset" name="reset" required="" value="Reset">

<hr size="5" color="white">

 

 

</form>

<?php

if(isset($_GET["submit"]))

{ $name1=$_GET["name1"];

$r=$_GET["review"];

$re=$_GET["rating"];

$m=$_GET["movie1"];

echo "Movie name :- ".$m." <br>";

echo "Username :- ".$name1." <br>";

echo "Review :- ".$r." <br>";

echo "Rating :- ".$re. "Stars "." <br>" ;

echo "Successfully submitted.. Thankks for your feedback " ;

}

 

?>

</div>

</body>

</html>

rating,php

<html>

<head>

<title> Renting Page </title>

</head>

<body bgcolor="red"> <hr size="5" color="white">

<h1><center><font face="Monotype corsiva" size="25" color="yellow"> Renting movie </center></font> </h1> <hr size="5" color="white">

<form method="GET">

 

<label>Select movie</label>

<select name="movie1">

<option value="1" > batman</option>

<option value="2" > godzilla</option>

<option value="3" > wonder woman </option>

<option value="4" > terminator</option>

<option value="5" > avengers</option>

<option value="6" > Harry potter</option>

<option value="7" > Anabelle</option>

<option value="8" > Hustlers</option>

<option value="9" > Joker</option>

<option value="10" > The lion king</option>

</select>

 

<input type="submit" name="submit" required="" value="Submit">

<input type="reset" name="reset" required="" value="Reset">

<hr size="5" color="white">

 

 

</form>

</div>

<div class="php">

<?php

if(isset($_GET["submit"]))

{ $movie1=$_GET["movie1"];

echo "Selected movie is : ".$movie1;

echo "<br> </br>";

echo "Amount charged : " ;

switch($movie1)

{

case 1 : echo " 42 dollars" ;

break;

case 2: echo "31.5 dollars" ;

break;

case 3 : echo "52.5 dollars" ;

break;

case 4: echo " 10.5 dollars" ;

break;

case 5 : echo " 21 dollars" ;

break;

case 6 : echo "31.5 dollars" ;

break;

case 7: echo "21 dollars" ;

break;

case 8 : echo " 10.5 dollars" ;

break;

case 9: echo " 52.5 dollars" ;

break;

case 10 : echo " 16 dollars" ;

break;

}

echo "Successfully rented" ;

}

 

?>

</div>

</body>

</html>

7 0
3 years ago
7. How many tables should a relational database contain?
Leona [35]

Im not sure but i think its C at least two but once again im not sure hope this helps :)

7 0
3 years ago
Other questions:
  • What is the outlined area called?
    6·1 answer
  • DESCRIBE FLOPPY DISK
    15·1 answer
  • What quadrants in the johari window need to shrink in order for us to gain greater self-awareness?
    5·1 answer
  • Give the Division Hashing function and the index it maps the key 2000 into, assuming a primary storage area array size of 61 ele
    6·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • How do i cancle my account on brainly
    11·1 answer
  • Compare and contrast an example of an actual company that has a brick and mortar location with an actual company that does not h
    8·1 answer
  • The main workspace of a Windows computer is called the______
    5·1 answer
  • When you navigate inside a compressed folder, you click the
    6·1 answer
  • A program is
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!