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
8090 [49]
3 years ago
9

from model years 1995-1998 and 2004-2006. A bool variable named norecall has been declared. Given an int variable modelYear writ

e a statement that assigns true to norecall if the value of modelYear does NOT fall within the two recall ranges and assigns false otherwise.
Mathematics
1 answer:
ololo11 [35]3 years ago
8 0

Your question is incomplete, here is the complete question with the solution.

Clunker Motors Inc. is recalling all vehicles from model years 1995 - 1998 and 2004 - 2006. A Boolean variable named norecall has been declared. Given an int variable modelYear, write a statement that assigns true to noRecall if the value of modelYear does NOT fall within the two recall ranges and assigns false otherwise.

Answer and Step-by-step explanation:

Given that

boolean norecall;

int modelYear;

We can solve this problem in three ways as given below:

<u>1st Method: Using If statement</u>

if((modelYear > 1994 && modelYear < 1999 )||(modelYear > 2003 && modelYear < 2007 )){

   norecall = false;  // this will assign false if the value of the modelYear falls within the two recall ranges

}else{

   norecall = true;  // this will assign true if the value of the modelYear does NOT falls within the two recall ranges

}

<u>2nd Method: Without using If Statement</u>

(!(modelYear >= 1995) && (modelYear <= 1998)) || (!(modelYear >= 2004) && (modelYear <= 2006))

// in this line the ymbol "!" shows that if the range is not within the two recall ranges (1995-1998 & 2004-2006) then it will goes down and will assign true to norecall.

norecall = true;

<u>3rd Method: Using Conditional Statement</u>

((modelYear>=1995 && modelYear <=1998) || (modelYear>=2004 && modelYear<=2006)) ? norecall =true : norecall =false;

You might be interested in
Angel 1 and angel 2 form a right angle. Writ a conjecture about each value or geometric relationship
earnstyle [38]

Answer:

it's angle not angel.

Step-by-step explanation:

5 0
3 years ago
Read 2 more answers
What is 2 7/10+4 1/10 in simplest form
WITCHER [35]

Answer:

6\frac{4}{5}

Step-by-step explanation:

2\frac{7}{10} + 4\frac{1}{10} = ( 2 + 4 ) + ( \frac{7}{10} + \frac{1}{10} ) = 6 \frac{7+1}{10} = 6 \frac{8}{10} = 6\frac{4}{5}

3 0
3 years ago
The staff has a meeting every morning.how long do they spend on meetings in a fortnight?​
Alona [7]

Answer:

isn't a fortnight 14?

Step-by-step explanation:

8 0
3 years ago
The diagram shows a triangle ABC 2.5 cm 4.6 cm work out the are of the triangle
Paladinen [302]

Answer:

Idk I need the answer too

Step-by-step explanation:

8 0
4 years ago
Two airplanes are are 1600 miles apart and heading toward each other at different altitudes. The first plane is traveling north
Elden [556K]

The planes will pass each other in 1.14 hours.

Why?

To solve the problem, we must remember that since both planes are heading toward each other, the speed to the calculations will be their combined speeds.

The speed will be:

Speed=PlaneA+PlaneB\\\\Speed=620mph+780mph=1400mph

Now, calculating the time, we have:

x=v*t\\\\1600mi=1400mph*t\\\\t=\frac{1600mi}{1400mph}=1.14hours

Hence, the planes will pass each other in 1.14 hours.

Have a nice day!

6 0
3 years ago
Other questions:
  • Min drive to work is 37 minitues. On the way, she stops at Starbucks for 7 minitues and fuels her car for 5 minitues. At what ti
    8·2 answers
  • Ratio equivalent to 70/50
    5·1 answer
  • Roman is drawing fraction bars to model the difference of Five-eighths and One-third. What is the smallest number of equally siz
    8·2 answers
  • three angles are adjacent to each other and form 140.the largest angle is twice the smaller angle and the angle which is middle
    10·2 answers
  • A carpenter cuts a board into three pieces of equal length ... smallest board is 1 ft. in length, how long was the original boar
    5·1 answer
  • Brainiest please help 100 points!
    14·2 answers
  • Solve for c.
    13·2 answers
  • 7 es un número natural?​
    5·1 answer
  • I literally went on brainly to see someone breaking up with someone on my question... I am going insane
    15·2 answers
  • PLEASE HELP PLEASE!!!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!