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
elena-14-01-66 [18.8K]
2 years ago
5

The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,

which is no wind, up to 12, which is a hurricane. The following script first generates a random force value. Then, it prints a message regarding what type of wind that force represents, using a switch statement. You are to rewrite this switch statement as one nested 150 CHAPTER 4: Selection Statements if-else statement that accomplishes exactly the same thing. You may use else and/or elseif clauses.
ranforce = randi([0, 12]); switch ranforce case 0 disp('There is no wind') case {1,2,3,4,5,6} disp('There is a breeze') case {7,8,9} disp('This is a gale') case {10,11} disp('It is a storm') case 12 disp('Hello, Hurricane!') end
Computers and Technology
1 answer:
TEA [102]2 years ago
5 0

Answer:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

<em>Replace all switch case statements with if and else if statements.</em>

<em>An instance is:</em>

<em>case {7,8,9}</em>

<em>is replaced with</em>

<em>else  if(ranforce>9 && ranforce <12)</em>

<em>All other disp statements remain unchanged</em>

You might be interested in
For local travel addresses and street names should be
saul85 [17]
Capitalized  and properly spelled 

8 0
3 years ago
Your friend Amy calls you asking for help with her new LCD monitor. She says the monitor isn't showing the whole picture. What i
swat32

Answer:     probably 1080p (which is HD)

Explanation:    Lcd monitors mainly support 1080p.

3 0
2 years ago
Complete the statement by entering the appropriate term in the space below.
Vera_Pavlovna [14]

Answer:

Probably "compress", but these days the common answer is "upload to cloud".

Explanation:

Compressing the files is an easy way to reduce their size, unless most of the size is in already compressed, high-entropy formats (like mp3, jpeg or mp4).

The common compression format is .ZIP - you've probably seen it countless times, but other ways like RAR, 7Z are also popular, while Linux users mostly deal with tar.gz, tar.bz2 or tar.xz

On the other hand, the standard practice these days is to upload the presentation to a cloud service, like GSheets or Office PowerPoint 365, which gets rid of the limits of email filesize, while providing a convenient web-app way to view the presentation without downloading (and it doesn't clutter their inbox space or hard drives)! Alternatively, one other way to email any large file (not just a presentation) includes uploading it to some service like DropBox, GDrive or anything similar.

7 0
2 years ago
Read 2 more answers
How are the functions different and how do i determine the answer
worty [1.4K]

Answer:

this isn't a fair question...

you'll either get 2,3 or 4

not a nice question

3 0
2 years ago
PLEASE HELP!!! What are the benefits of online notebooks? Check all that apply.
Kipish [7]

They allow users to store files.

They allow users to share files.

They help users organize assignments.

They allow users to clip information from web pages.

4 0
2 years ago
Read 2 more answers
Other questions:
  • Derek is working at the help desk when he receives a call from a client about an issue with the company's email. The customer is
    9·1 answer
  • Normal wear and road conditions can take their toll on a car’s steering and suspension system, altering __________. A. wheel ali
    15·2 answers
  • With a web app, much of the program code for the software runs locally on a computer, instead of running on a remote computer co
    13·1 answer
  • What is the best operating system
    12·1 answer
  • It is important for security practitioners to take into consideration the __________ element when devising password security pol
    15·1 answer
  • Numerical methods are implementations of mathematical algorithms, but constructed with special consideration for accuracy of sol
    7·1 answer
  • Derek has to create a technical design of a complex floor plan using CAD. What will be most helpful for Derek to use to create t
    8·1 answer
  • PLZZZZZ help will give brainleist <br> Two common sound files are?
    11·1 answer
  • You are the security analyst for your organization and have discovered evidence that someone is attempting to brute-force the ro
    11·1 answer
  • After Daniel performed poorly on a test, his teacher advised him to do some self-reflection to figure out how he could get a bet
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!