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
Ratling [72]
3 years ago
15

What is the output after running the following code snippet? int number = 600; if (number < 200) { System.out.println("Low sp

ender"); } else if (number < 500) { System.out.println("Spending in moderation"); } else if (number < 1000) { System.out.println("Above average!"); } else { System.out.println("High Roller!"); }
Computers and Technology
1 answer:
Nutka1998 [239]3 years ago
8 0

Answer:

Above average!

Explanation:

The code snippet is testing different values of the integer variable number.

If number is less than 200 It prints Low Spender

else If number is more than 200 but less than 500 It prints Spending in moderation

else if number is more than 500 but less than 100 It prints Above Average!

In the code snippet given, number is set to 600 So it prints Above Average!

You might be interested in
For this lab you will do 2 things:
zepelin [54]

Answer:

Here is the Python program:

COOKIES_PER_BAG = 40 #sets constant value for bag of cookies

SERVINGS_PER_BAG = 10 #sets constant value for serving in bag

CALORIES_PER_SERVING = 300 #sets constant value servings per bag

cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user

print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed

Explanation:

The algorithm is:

  • Start
  • Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
  • Set COOKIES_PER_BAG to 40
  • Set SERVINGS_PER_BAG to 10
  • Set CALORIES_PER_SERVING to 300
  • Input cookies
  • Calculate totalCalories:                                                                                                                       totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
  • Display totalCalories

I will explain the program with an example:

Lets say user enters 5 as cookies he or she ate so

cookies = 5

Now total calories are computed as:

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));  

This becomes:

totalCalories = 5 * (300/40/10)

totalCalories = 5 * (300/4)

totalCalories = 5 * 75

totalCalories = 375

The screenshot of program along with its output is attached.

4 0
3 years ago
History of computer from difference engine <br>​
harkovskaia [24]

Answer:

Charles Babbage (1791-1871), computer pioneer, designed two classes of engine, Difference Engines, and Analytical Engines. Difference engines are so called because of the mathematical principle on which they are based, namely, the method of finite differences.

Explanation:

4 0
2 years ago
Read 2 more answers
(tco 6) after connecting to an ftp site, the _____ command will upload multiple files.
m_a_m_a [10]
<span>After connecting to an ftp site, the mget command will upload multiple files.
</span><span>The </span>mget command<span>  retrieves multiple files from a remote server directory and stores them in the current local directory.
</span><span>ftp> mget <start of the like files> *
</span>

ftp> mget file01 file02 file03

ftp> mget filename*

ftp> mget *.txt

5 0
3 years ago
If totalMonths has a string value of "13", what does the code that follows display?var years = parseInt ( totalMonths / 12 );var
TEA [102]

Answer:

The answer to this question is "Option a".

Explanation:

The description of the JavaScript code as follows:

  • In the code, there is two variable defined that are "years and months". The years convert string value in number and calculate years and holds value in years variable and months variable calculate the moths and holds value in months variable.
  • Then we use conditional statements in this statement we use two if blocks. In first if block we check that years variable value is equal to 0. if this condition is true. it will print months in the alert box.
  • In second if block we check that if months variable value is equal to 0. if this condition is true. it will print years in the alert box.
  • In else block, we use an alert box that prints years and months.

6 0
3 years ago
How telecommunications works?​
SIZIF [17.4K]

Answer:

Telecommunications are the means of electronic transmission of information over distances. The information may be in the form of voice telephone calls, data, text, images, or video. Today, telecommunications are used to organize more or less remote computer systems into telecommunications networks.

Explanation:

3 0
2 years ago
Other questions:
  • ​a(n) ____ is a communications device that connects a communications channel such as the internet to a device such as a computer
    11·1 answer
  • Your uncle spent most of his teen years in a hospital undergoing treatment for a severe physical illness. As an adult, he is rat
    10·1 answer
  • How do I turn of the noise canceling feature on my beats studio wireless?
    13·1 answer
  • What did Francis Ford Coppola and George Lucas create?
    10·1 answer
  • Your company runs several databases on a single MySQL instance. They need to take backups of a specific database at regular inte
    12·1 answer
  • Does anyone have the GCSE 2018 Design Technology J310/01 practice paper?
    15·1 answer
  • You are creating a presentation and you have come to the last slide. you still have more information to add. what should you do?
    10·2 answers
  • Your team will write a function that reverses a C-string, to practice using pointers. You must use pointers and C-strings for th
    6·1 answer
  • _____ interviews rely on scenarios and reflections to evaluate an applicant’s skill set.
    9·2 answers
  • Your computer is taking longer than usual to open files and you notice that your hard drive light stays on longer than usual whi
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!