emmaja121003
08.02.2021 •
Computers and Technology
Write a script that creates 3 numerical variables describing the dimensions of a pyramid in meters: - The length of the base of the pyramid should be 5 - The width of the base of the pyramid should be 10 - The height of the pyramid should be 4.5 Then write another line of code that creates a variable named volume that contains the volume of the pyramid in meters squared. Note that the volume of a pyramid is the length times the width times the height divided by 3. Remember that units are not something that can be stored in numerical variables, and are just for your reference.
Solved
Show answers
More tips
- A Art and Culture The History and Characteristics of Jazz Bands: A Deep Dive...
- W Work and Career Can Skill Alone Make You a Professional?...
- F Family and Home Daughter says: If you don t want to do it, don t do it. Should we persuade her?...
- S Science and Technology How to Secure Exam Sessions: Silence Mobile Phones in the Classroom...
- C Computers and Internet Which Phone is Best for Internet Surfing?...
- P Philosophy Is Everything We Strive for Eventually Achieved and Destroyed?...
- S Society and Politics Understanding Politics and Its Role in the Development of Civilization...
- P Philosophy Why Did God Create Man and Place Him in Obscurity?...
- S Society and Politics Skoptsy: Who They Are and How They Perform Castration?...
- O Other Childhood Fears: What Many of Us Experienced...
Answers on questions: Computers and Technology
- G Geography True or False: As the human population continues to increase, less groundwater will be used. True False...
- M Mathematics You work for a carpet company. You sell carpets: 100 square feet for $67,200 square feet for $130,400 square feet for $240, and 800 square feet for $504. What is the approximate...
- G Geography Explain 4 reasons for the impact of marketing partners on the export of a product....
- M Mathematics Dont remember any of this this isb my sisters assignment...
- M Mathematics 1. Using the algebraic expression 6p + 5 = c. Where p represents packs of cards and c represents cost. Solve for the number of packs of cards if the cost was $53.00 * 5...
Ответ:
Check the explanation
Explanation:
CODE:
static int findEvenQueue(Queue<Integer> numbers)
{
//loop runs till the queue has atleast one element
while(numbers.size() > 0)
{
//Checking the head of the queue whether it is even
int temp = numbers.peek();
if(temp % 2 == 0)
{
//if the head is even then return it
return temp;
}
else
{
//else remove the number at head
int removed = numbers.poll();
}
}
//if no even number present in the Queue then return -1
return -1;
}