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
murzikaleks [220]
3 years ago
11

Difference between switch case and if else statement.​

Computers and Technology
1 answer:
ser-zykov [4K]3 years ago
7 0

Answer:

<h3><em>SWITCH</em><em> </em><em>CASE</em><em>:</em></h3>

<em>☆</em><em> </em><em>STATEMENT</em><em> </em><em>WILL</em><em> </em><em>BE</em><em> </em><em>EXECUTED</em><em> </em><em>IS</em><em> </em><em>DECIDED</em><em> </em><em>BY</em><em> </em><em>USER</em><em>. </em>

<em>☆</em><em> </em><em>SWITCH</em><em> </em><em>STATEMENT</em><em> </em><em>EVALUATES</em><em> </em><em>ONLY</em><em> </em><em>CHARACTER</em><em> </em><em>《</em><em>OR</em><em> </em><em>》</em><em>INTEGER</em><em> </em><em>VALUE</em><em>. </em>

<em>☆</em><em> </em><em>IT</em><em> </em><em>USING</em><em> </em><em>SINGLE</em><em> </em><em>EXPRESSION</em><em> </em><em>FOR</em><em> </em><em>MULTIPLE</em><em> </em><em>CHOICES</em><em>. </em>

<h3><em>IF</em><em> </em><em>-</em><em> </em><em>ELSE</em><em> </em><em>STATEMENT</em><em>. </em></h3>

<em>☆</em><em> </em><em>STATEMENT</em><em> </em><em>WILL</em><em> </em><em>BE</em><em> </em><em>EXECUTED</em><em> </em><em>DEPEND</em><em> </em><em>UPON</em><em> </em><em>THE</em><em> </em><em>OUTPUT</em><em> </em><em>OF</em><em> </em><em>THE</em><em> </em><em>EXPRESSION</em><em> </em><em>INSIDE</em><em>. </em>

<em>☆</em><em> </em><em>IF</em><em> </em><em>THE</em><em> </em><em>STATEMENT</em><em> </em><em>EVALUATES</em><em> </em><em>INTEGER</em><em>, </em><em>CHARACTER</em><em>, </em><em>POINTER</em><em>《</em><em> </em><em>OR</em><em> </em><em>》</em><em>FLOATING-</em><em> </em><em>POINT</em><em> </em><em>TYPE</em><em> </em><em>《</em><em> </em><em>OR</em><em> </em><em>》</em><em>BOOLEAN</em><em> </em><em>TYPE</em><em>. </em>

<em>☆</em><em> </em><em>IF</em><em> </em><em>USING</em><em> </em><em>MULTIPLE</em><em> </em><em>STATEMENT</em><em> </em><em>FOR</em><em> </em><em>MULTIPLE</em><em> </em><em>CHOICES</em><em>. </em>

<em>HOPE</em><em> </em><em>IT</em><em> </em><em>HELP</em><em>.</em><em>.</em><em>.</em><em>.</em><em /><em /><em />

You might be interested in
What are the sectors of the buisness enviornment
Alinara [238K]

Answer:

The external business environment consists of economic, political and legal, demographic, social, competitive, global, and technological sectors.

4 0
2 years ago
Calculate the resistance of an unknown resistor in a circuit with 30 volts and 6 amps. The formula is R = V/I.
arsen [322]
The answer is 5 ohms
7 0
2 years ago
Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
Gnoma [55]

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

3 0
3 years ago
Which of the following is not an operating system
mrs_skeptik [129]

Answer:

C

Explanation:

I hope this helped.

3 0
3 years ago
Read 2 more answers
What OC level is primarily used as a regional isp backbone, and occasionally by very large hospitals, universities, or other maj
Neporo4naja [7]

The OC level is primarily used as a regional ISP backbone, and occasionally by very large hospitals, universities, or other major enterprises is <u>OC-48.</u>

<u></u>

<h3>What is the greatest amount of throughput provided by an OC 12?</h3>

OC-12 is a network line with communication speeds of up to 622.08 Mbit/s (payload: 601.344 Mbit/s; overhead: 20.736 Mbit/s). OC-12 lines are generally used by ISPs as wide area network (WAN) connections.

<h3>When using frame relay What is the appellation of the identifier?</h3>

A data-link connection identifier (DLCI) determines the Frame Relay PVC. Frames are routed through one or more virtual circuits determined by DLCIs.

Each DLCI has a permanently configured switching path to a particular destination

To learn more about OC level , refer

brainly.com/question/25899244

#SPJ4

<u></u>

5 0
1 year ago
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • Which of the following is not a commodity?<br>A. Crude oil<br>B. Corn dogs<br>C. Cocoa<br>D. Coffee​
    10·2 answers
  • How does the binary numbering system differ from the hexadecimal numbering system?
    14·2 answers
  • assume an int array, candy, stores the number of candy bars sold by a group of children wherecandy[j] is the number of candy bar
    7·2 answers
  • Which hexadecimal number is equivalent to the decimal number 11?
    13·1 answer
  • In your own words explain how to add footer and head in a word doc.
    10·1 answer
  • Which do switches create?<br> Networks<br> Wireless access points<br> Routes<br> Collision domains
    13·1 answer
  • After fixing the format of her subheadings, she notices that she misspelled the name of one of the famous people
    7·2 answers
  • When all the system testing and bugs correction has done, the software product will be delivered to the user for __________.
    15·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!