Fix the infinite loop so that it counts from 3 down to 1.public class Loop1{public static void main(String[] args){int x = 3;while (x > 0){System.out.println(x);}}}

Answers

Answer 1

Answer:

Include x-- right after the print statement

Explanation:

Given:

The above lines of code

Required

Edit to countdown from 3 to 1

The above code (as it is) prints 3 in infinite times. To make it countdown to 1, we simply include a decrement operation.

Initially, the value of x is 3: int x = 3;

And the condition is that the loop is to be repeated as long as x > 0

All we need to do is to include x-- right after the print statement.

This  operation will reduce the value of x on every iteration as long as the condition is true.

Hence, the complete code is:

public class Loop1{

   public static void main(String[] args){

       int x = 3;

       while (x > 0){

           System.out.println(x);

          x--;

       }}}


Related Questions

A __________ is the blueprint for __________ having similar attributes and behaviors. signature, objects class, parameters header, objects signature, parameters class, objects

Answers

Answer: E. class, objects

Explanation:

A class is the blueprint for objects having similar attributes.

As much as classifying something means to define it based on the characteristics that is has that are similar to other things in that class, so also is a class here.

A class is the blueprint or rather template for making objects that have similar attributes which means that the class therefore gives the object its various attributes and its behavior.

All of the following describes technology EXCEPT
(a) application of knowledge (b) development of skills
(c) solving of problems (d) prohibiting human capabilities

Answers

Answer: (d) prohibiting human capabilities

Explanation:

Technology can be described as application of knowledge, development of skills or solving of problems.

Technology helps in solving numerous challenges. Technology involves skills and application of knowledge. Every technology used today solves a problem in one way or the other.

Technology prohibiting human capabilities doesn't describe technology. It doesn't limit the abilities of humans but rather improves it.

How many minutes are there from 8:00 am to 1:00 pm?

Answers

Well it’s 5 hours so you take 5 times 60m for each hour and you get 300m

Answer:300 minutes

Explanation:

from 8 to 1 is 5 hours so you do 5*60= 300

A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by
O clicking on the View tab.
O saving a contact.
O creating an appointment.
O flagging an email.

Answers

A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by clicking on the View tab. Thus, option A is correct.

What is a Variable Expense?‌

Business expenses can be classified as either fixed (invariable) or variable. A fixed expense does not change based on a business’s other activities. Costs like rent and administrative salaries are fixed costs, which remain the same no matter how much a business is producing. Imagine a factory that produces pencils — the cost of renting the factory building will remain the same, month after month, no matter how many pencils the company actually produces.

Variable expense ratio expresses variable expenses as a proportion of a company's sales. To calculate the variable expense ratio, simply divide the company's total variable expenses by the company's total net sales. To express the result as a percentage, simply multiply it by 100.

Therefore, A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by clicking on the View tab. Thus, option A is correct.

Learn more about variable expense on:

https://brainly.com/question/13097236

#SPJ5

we need to send 254 kbps over a noiseless channel with a bandwidth of 15 khz. how many signal levels do we need

Answers

Answer:

The level of the signal is 353.85

Explanation:

Data rate determines the speed of the data transmission.

The data rate depends on the following factors

The available bandwidthnumbers of signal levelsthe quality of the channel ( Means the level of noise )

The data is transmitted either from a noiseless channel or a noisy channel.

The given quality of the channel in the question is noiseless.

Use the following formula to calculate the signal levels

Bit rate = 2 x bandwidth x [tex]Log_{2}[/tex] ( signal level )

where

Transmitted Data = 254 kbps = 254,000 bps

Bandwidth = 15 khz = 15,000 hz

Placing values in the formula

254,000 = 2 x 15,000 x [tex]Log_{2}[/tex] ( L )

254,000 = 30,000 x [tex]Log_{2}[/tex] ( L )

254,000 / 30,000 = [tex]Log_{2}[/tex] ( L )

8.467 = [tex]Log_{2}[/tex] ( L )

L = [tex]2^{8.467}[/tex]

L = 353.85 levels

In the graph shown here, by what percentage are the number of people in computer occupations in general projected to increase?


21%

26%

10%

12%

Answers

The number of people in computer occupations in general is projected to increase at 12%

The chart

Reading the charts, we have the following entries

Software developer applications = 26%Software developer = 21%Computer occupations = 12%Software developers, system software = 10%

Using the above entries, we can conclude that:

The number of people in computer occupations in general is projected to increase at 12%

Read more about bar charts at:

https://brainly.com/question/25069221

When we add suffix L to a integer it is called as __________​

Answers

Answer:

Long integer literal.

Explanation:

Integer literal can be defined as numbers that do not contain any decimal point or augmented part. An integer literals can be characterized as decimal, octal, or hexadecimal constant. When an integer liteal is added with prefix it tends to define its base, whereas suffix define its type.

The suffix L to an integer literal means long integer literal. The suffix can be written in any form, either upper case (L) or lower case (l).

Therefore, the correct answer is long integer literal.

According to the video, what are some concerns of Webmasters? Check all that apply.
how fast the website can be accessed
how many writers provide content for a website
how to create images for a website
the number of similar websites that exist
the time it takes for elements on a website to download
website security and privacy

Answers

Answer:

A.how fast the website can be accessed

E.the time it takes for elements on a website to download

F.website security and privacy

Explanation:

Answer:

1,5,6

Explanation:

hope this helps gg

list the difference between sdram and dram​

Answers

Answer:

i need this for a challenge

Explanation:

Consider a file/directory with the following info:

-rwxr-x--x 1 milk milk 1858 May 1 16:29 abc

Which of the following statement(s) is/are true for the file/directory? Pick ONE OR MORE options

a. abc is a directory.
b. The group the owner belongs to can read and execute abc.
c. All other users can execute abc.
d. The owner can not execute abc.

Answers

Answer:

The statement that is true for the file/directory is:

a. abc is a directory.

Explanation:

A file directory is a computer filing system with cataloging and referencing structure to computer files and other directories.  Also known as folders or drawers, directories are like the workbench or traditional office filing cabinet.  Information is stored in files, which are then stored in directories (folders). Directories can also store other directories to form a directory tree.

"abc" is a directory. A further explanation is below.

A file directory would be a type of computer organizing system that provides cataloging and reference architecture for computer records as well as other directories.Files have been used to hold knowledge, which would be subsequently organized into directories. Additional directories could be stored in directories just to construct its hierarchy.

Thus the above approach is right.

Learn more about the directory here:

https://brainly.com/question/7007432

During the reconnaissance step of the attack, what open ports were discovered by Zenmap? What services were running on those ports?

Answers

Answer:

Following are the solution to the given question:

Explanation:

It sends commands to its Nmap executable platForm, which is used to specified and retrieves the production. The  ZenMap utilizes templates, which are primarily Nmap.

The parameter templates to decide how scans become formed Several ports, like ports, are available: 11, 21, 22, 25, 53, 445, and 3306, all of which run TCP: Linux services, SMTP Postfix, Apache Tomcat/Coyote JSP.

What is a variable?

A.a box (memory location) where you store values

B. a type of memory

C. a value that remains the same throughout a program

D. a value that loads when the program runs

Answers

Answer. D: a value that looks loads when the program runs.


Explanation:

In programming, a variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running.

which of the following is not a type of operating system software?
a) windows b) linux
c)Macintosh d) Communications and organization​

Answers

Answer:

the answer is communication abd organization

The option that is not a type of operating system software is called; D: Communications and organization​

What are the types of Computer operating system?

An operating system is defined as a type of software that manages the hardware and software of a computer as well as provision of common services.

The most popular Operating Systems for computers are Windows, Linux,  Macintosh. Whereas, the popular types of operating systems for phones are iOS, Android, and Windows.

Read more about Computer Operating System at; https://brainly.com/question/1763761

#SPJ9

How many passes will it take to find the four in the list 4,5,6,7,8,9,10

Answers

Answer:

1

Explanation:

Which of the following is not a type of digital signature?

a. Approval Signatures
b. Non-Certified Signatures
c. Visible Digital Signature
d. Invisible Digital Signature

Answers

Answer:

d

Explanation:

Term that doesn't belong to a type of digital signature is Invisible Digital Signature.

What is digital signature?

A digital signature  can be regarded as the  mathematical technique used to validate the authenticity and integrity of a message.

Examples of type of digital signature are:

Approval SignaturesNon-Certified SignaturesVisible Digital Signature

Therefore, option D is correct.

Learn more about digital signature at;

https://brainly.com/question/24448358

Which are the steps in the process of creating a database

Answers

Answer:

Determine the purpose of your database. ...

Find and organize the information required. ...

Divide the information into tables. ...

Turn information items into columns. ...

Specify primary keys. ...

Set up the table relationships. ...

Refine your design. ...

Apply the normalization rules.

Answer:

identifying fieldnames in tables

defining data types for field names

Explanation:

sorry I'm late. future Plato users this is for you

What is the difference between a programming language and natural (every-day) language?

Answers

Natural languages are used for communication between people

Recently, Walmart offered a wireless data contract based on bandwidth used, with a minimum monthly charge of $42 for up to 5 gigabytes (GB) of use. Additional GB can be purchased at the following rates: $12 for an additional 1 GB, $28 for an additional 3 GB, and $44 for a capacity of 10 GB. What is the cost for a user who is expecting to use 9 GB

Answers

Answer:

For 9GB of data the user would pay $82 monthly!

Explanation:

To start off, our end goal is 9GB. We have the equation 9 = ? We can add up to our solutions with 1GB, 3GB, and 10GB. We can immediately rule out 10GB, since 9GB ≠ 10GB. To cost the least amount of money we can add up             3GB and 1GB = 4GB + 5GB = 9GB!

So, our equation is 3GB + 1GB + 5GB = 9GB, now lets figure out the cost!

                                $28 + $12 + $42 = $82

For 9GB of data the user would pay $82 monthly!

Hope this Helps! :)

Have any questions? Ask below in the comments and I will try my best to answer.

-SGO

PLEASE HELP
A program is designed to determine the minimum value in a list of positive numbers
called numlist. The following program was written
var minimum = MISSING CODE
for(var i = lo; i < numlist.length; i++){
if (numList[1] < minimum)
minimum = numList[1];
console.log("The minimum is" - minimum);
Which of the following can be used to replace ISSING CODE> so that the program works as intended for every possible list of positive numbers?

Answers

The missing code segment is meant to initialize the variable minimum to the first list element.

The missing code is (d) numList[0]

From the question, we understand that the first line of the program should determine the smallest number in the list numList

To do this, we start by initializing the variable minimum to the first element of numList

This is done using the following code segment:

var minimum = numList[0]

Hence, the missing code segment is (d) numList[0]

Read more about similar programs at:

https://brainly.com/question/19484224

What is the BCC feature used for?

to format email message text in a custom font
to format email message text in a blind font
to send a courtesy copy of an email to someone who does not need to take action
to send an email to someone without revealing that person’s email address to others on the distribution list

Answers

Answer:

to send an email to someone without revealing that person’s email address to others on the distribution list

Explanation:

BAM

To send an email to someone without revealing that person’s email address to others on the distribution list.

What is BCC?

"Blind carbon copy" is referred to as BCC. BCC is a similar method to CC for forwarding copies of an email to additional recipients. When CC is used, a list of recipients is shown; when BCC is used, a list of recipients is not visible.

Because the other receivers won't be able to see that the email has been forwarded to another person, it is known as a blind carbon copy.

Carbon copy is referred to as a "CC" in email communication. When there was no internet or email, you had to sandwich a piece of carbon paper between the paper you were writing on and the paper you wanted to use as your copy in order to make a copy of the letter you were writing.

Therefore, To send an email to someone without revealing that person’s email address to others on the distribution list.

To learn more about BCC, refer to the link:

https://brainly.com/question/29398332

#SPJ6

Which of the following statements is true when it comes to developing a web presence for a business?

Answers

Explanation:

Customers can learn about a business by downloading a mobile app, but they can’t place an order using an app

 

Building a new website requires a large budget

NEED HELP 100 POINTS FOR ANSWER AND BRAINIEST!!! Which comparison operator is used to signify that a value is not equal to another value?
<>
<<
>=
=

Answers

Answer:

We use SQL Not Equal comparison operator (<>) to compare two expressions. For example, 10<>11 comparison operation uses SQL Not Equal operator (<>) between two expressions 10 and 11

Explanation:

<> operator is used to signify that a value is not equal to another value , Option A is the correct answer.

What are Comparison Operators ?

An operator used to compare or relate the value of two number or string is called a Comparison operator.

The value of 0 or 1 is returned on using Comparison Operators.

<> , Not equal to operator signifies that the value are either greater than or less than the other value but not equal in any case.

Therefore <> operator is used to signify that a value is not equal to another value.

To know more about Comparison Operators

https://brainly.com/question/15260168

#SPJ2

Which example can be used to perform a binary search?

Answers

Answer:

In any case, binary search can be used to solve more extensive scope of problem, for example, finding the next smallest or next-biggest element in an array comparative with the target regardless of whether it is present or missing in the array.

Explanation:

In computer science, binary search, otherwise called logarithmic search, is a search calculation that finds the position of an objective incentive inside an arranged array. Binary search compares  the  target value to the center component of the array. In the event that they are not equivalent, the half in which the value can't lie is dispensed with and the search proceeds on the other half, again taking the center value to contrast with the target value, and continues this until the target value is found. On the off chance that the search ends with the other half being empty, the target value isn't in the array.

Binary search is quicker than linear search aside from small arrays. Nonetheless, the array should be arranged first to have the option to apply  binary search. There are particular data structures intended for quick looking, for example, hash tables, that can be looked through more effectively than binary search.

She can't part.....her jewels.​

Answers

Answer:

She can't part with her jewels.

Explanation:

:))))

Name one characteristic of natural languages that prevents them from being used as programming languages.

Answers

Answer:

Ambiguity.

Explanation:

Natural language of human beings are believed to be ambiguous, as it often required settings punctuation, and intonation to determine certain meanings correctly.

Also is the fact that natural language sometimes has more than one meaning for the same words.

Hence, one characteristic of natural languages that prevent them from being used as programming languages is AMBIGUITY.

Which is an example of a technology that has changed the safety of humans?
A) a bicycle

B) a window

C) a rope

D) a baseball bat

Answers

Answer:

B

Explanation:

because they have added more protection from breaking window to keep people safe such as if there were a lot of layers of city

Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space. Example output for userNum

Answers

userNum = int(input("Enter a number: "))

while userNum > 1:

   print(userNum, end=" ")

   userNum /= 2

I wrote my code in python 3.8. I think this is what you want but I'm not too sure. I'll change the code if you need me to.

Is a free verse a poetry that has no images

Answers

No it just means that it does not have any specific rhymes or formats
No they just typically have no set meter

given a number n for each integer i in the range from 1 to n inclusive print one value per line as follows fizzbuzz if __name__

Answers

Answer:

The program in Python is as follows:

def fizzBuzz(n):

    for i in range(1,n+1):

         print(i)

   

if __name__ == '__main__':

    n = int(input().strip())

    fizzBuzz(n)

Explanation:

This declares the fizzBuzz function

def fizzBuzz(n):

This iterates from 1 to n

    for i in range(1,n+1):

This prints every number in that range; one per line

         print(i)

   

The main begins here

if __name__ == '__main__':

This prompts user for input

    n = int(input().strip())

This calls the fizzBuzz function

    fizzBuzz(n)

Write a function called quadruple that quadruples a number and returns the result. Then make several calls to the quadruple function to test it out.

For example, if you made a call like

x = quadruple(3)
then x should hold the value 12.

Print the value of x to verify your function works correctly.

(CODEHS, PYTHON)

Answers

def quadruple(n):

   return n*4

print(quadruple(3))

print(quadruple(1))

print(quadruple(2))

I wrote my code in python 3.8. I hope this helps.

/kwɒdˈruː.pəl/ to increase by four times, or to multiply anything by four: In the past ten years, the college's enrolment has increased by a factor of four.

What is the role of quadruple that quadruples a number?

Finding the array's four maximum and four minimum components is another method for locating the quadruple with the highest product. And then supply the maximum of these three product values, which will result in a quadrupled maximum product.

When ordering a quadruple-shot latte, which contains four shots of espresso, you can also use the word quadruple to signify “four times as many.” The suffix quadric-, which means “four,” is the source of the Latin root quadruple, which means “create fourfold.”

Three address codes are also referred to as quadruples. Using pointers to entries in a symbol table as the operands and an enumerated type to represent the operations, quadruples can be accomplished.

Therefore, One operation and up to three operands are divided into four fields in a quadruple.

Learn more about quadruples here:

https://brainly.com/question/7966538

#SPJ2

Other Questions
Desiree writes songs for her band. her first song is 3 1/2 minutes long. Her second song is 1 1/2 times as long as her first song. her third song is 2/3 times as long as her second song. How many minutes long are the second and third songs? Suppose a friend tells you she paid a total of $20,500 for a car, and youd like to know the cars list price (the price before taxes) so that you can compare prices at various dealers. Find the list price of the car if your friend bought the car in:Roswell, where the sales tax is 6.5% Why are some peoples rights more limited than others? PLZZ ANSWER how did the triangular trade benefit European colnies in the americas In a right triangle, the length of one leg is 20 units. The length of the other leg is 12 units. What is the length of the hypotenuse? An online service charges $3 for each downloaded movie, plus a monthly fee of $6,50 Which function represents thissituation?OY=3x6.50OY"65073Oy 3x6.50OY=650x3I need bad help. (-5b^3) (-3b^6)Solve the equation a shoe store has a sale in which all shoes are priced at $33.00. the original price was $44. what is the percent of discount. true or false need help asap 67% 33%32% which one is true Take your time with this. Just try to help me with this. HELP ME PLSSSSSSSSSS THANK UUU HELP ASAP PLS Is an oxygen ion and fluorine ion bigger and why? Louis has $300 to spend on a pair of skis. Sales tax is 8.5%Part ADecide if each description of a price and discount, plus sales tax, is an amount Louis could pay with the money he has to spend on skis.Select Less than or equal to $300 or More than $300 for each description20% off $339Less than or equal to $300More than $300$15 off $310Less than or equal to $300More than $30025% off $365Less than or equal to $300More than $300$20 off $300Less than or equal to $300More than $300 During a period of drought, members of a community may volunteer to water their lawns every other day, rather than daily. The most important benefit of this action is - It adds nitrogen to the soil It fertilizes the soil It reduces air pollution It conserves the groundwater supply How did trade help the Minoans develop wealth? PLSSSSSSSS HELLLLLPPPPPPP!! BRAINLIEST FOR CORRECT ANSWER!!!!!!!!!!!!!!Find the amount paid for the loan. $2400 at 10.5% for 5 years Who is the photographer of the above image? What did Peter learn during his travels to Western Europe? Which of the following are personal standards that people develop overtime 1) character 2) morals 3)values 4)ethics Ok Ill ask again cuz one of them said tomorrow and I should watch Jojo something lol so heres the question shall I k^^* myself today or tomorrow