Rewrite the following using if else statement:
int x;
String s=(x%3=0)? “Divisible by 3" : "Not divisible by 3";
System.out.println(s);​

Answers

Answer 1
int x;
String s = “x%3=0?”
if( x%3 == 0){
s = “Divisible by 3”
}
else{
s = “Not divisible by 3”
}
System.out.println(s)

Related Questions

Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate conditional statement for this
please hurry i need urgent
please answer correct
or i will report

Answers

The algorithm is as follows:

1. Start

2. bottles = 0

3. While bottles != 500

3.1 Create bottle

3.2 bottle = bottle + 1

4. Switch off machine

5. Stop

Explanation:

This begins the algorithm

1. Start

This initializes bottles to 0

2. bottles = 0

The loop is repeated until 500 bottles is created

3. While bottles != 500

This creates a new bottle

3.1 Create bottle

This increments the number of bottles by 1

3.2 bottle = bottle + 1

This switches of the machine after all bottles are created

4. Switch off machine

End algorithm

5. Stop

THANKS

How is Ms word more suitable and easier for document designing?

Answers

Answer:

MS Word is a word processing application, that built with an excellent array of features that permit the editing of text documents, with fonts, margins, borders, and page layout properties. Tables, charts, word art, shapes and pictures can be easily added to enhance the appearance and professional look of documents, as well as being able to publish documents in Portable Document Format, PDF and other file formats

Using MS Word, users an create write contract documents, resume, write-ups, fliers, invitation cards, projects, and reports from several customizable templates available in the Online Templates option of creating New Documents

The application provides support and upgrade to users that enable them make the most use of their time by having the required text document creation features in one application

Explanation:

What is the role of memory in a computer​

Answers

Answer:

Computer random access memory (RAM) is one of the most important components in determining your system's performance. RAM gives applications a place to store and access data on a short-term basis. It stores the information your computer is actively using so that it can be accessed quickly.

A database planner names a field “Organic ingredients_3”. Why would this name Create possible problems in programming?

Answers

Answer:

I think the answer is 2.

hope it will help you

Because it contains an embedded space

The place on the computer where information is stored temporarily so the processor can access it quickly is called what? Memory Kernel Mode Driver

Answers

Answer:

The answer is Memory

How do you send a file to someone in an email? (Choose all that apply). A. Select Send File and choose the file you need. B. Select the paperclip icon and choose the file you need. C. Open the file and then select Send in your email. D. Select Attach and choose the file you need.

Answers

Answer:

C. Open the file and then select Send in your email.

D. Select Attach and choose the file you need.

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties.

One of the most widely used communication channel or medium around the world is an e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send and receive texts and multimedia messages over the internet.

A file can be defined as a computer resource that avails end users the ability to store or record data as a single unit on a computer storage device.

The following documents or files such as soft copy attachments, web links and web pages may be sent from one user to another through the use of an email.

On a related note, some of the methods used for sending a file to someone in an email are;

I. Open the file and then select Send in your email.

II. Select Attach and choose the file you need.

Select the six parts of the boot sequence. Computer displays details of the process BIOS confirms it has found boot loader Shortcuts and hotkeys loaded BIOS begins flashing process Boot loader loads operating system First sector of boot disk is accessed Computer performs POST Power goes to motherboard Printer prints test page

Answers

Answer:

Computer displays details of the process

BIOS confirms it has found boot loader

Boot loader loads operating system

First sector of boot disk is accessed

Computer performs POST

Power goes to motherboard

Explanation:

Other Questions
A normal distribution has a mean of 20 and a standard deviation of 4. Determine the z-score for the data value of 42. 50 points and brainly Trinas you company charges $0.86 per pound to ship toys. Part A: Write an equation to determine the totals cost, c, to ship p pounds of toys. Use your equation to determine the cost of shipping 2 pounds of toys. Path B: if the company reduces the cost to ship toys by $0.05 per pound, write an equation to determine the total cost, c, to ship p pounds of toys with the reduced cost. Is this a complex sentence?" I tried heating my dinner in the microwave, but it came out cold still." In the electron transport chainprotons are pumped into the intermembrane spacewater is split into oxygen and hydrogenelectrons combine with oxygen to form carbon dioxide,carbon dioxide combines with water to form glucose Using the following equation for the combustion of octane calculate the heat associated with the formation of 100.0 g of carbon dioxide. The molar mass of octane is 114.33 g/mole.2C8H18 + 25O2 16 CO2 + 18 H2O Hrxn = -11018 kJ the ability for carbon to form long chain or rings is Given the center and radius, find equation of the circle which primitive organic molecule was essential to form lipid bilayer? a)protenoid b)phospholipid c)autocatalytic RNA d)aminoacids NEED HELP, BEING TIMED OUT!!! Solve the quadratic equation by completing the square. almost done vampire diaries. what other shows do you recommend me to watch? difference between finite and non finite verbs PLEASEE HELP ME ASAPPP (geometry) Sage Company is operating at 90% of capacity and is currently purchasing a part used in its manufacturing operations for $18.00 per unit. The unit cost for the business to make the part is $20.00, including fixed costs, and $9.00, not including fixed costs. If 30,694 units of the part are normally purchased during the year but could be manufactured using unused capacity, the amount of differential cost increase or decrease from making the part rather than purchasing it would be a Simplify the algebraic expression by combining like (or similar) terms.2xy2+33y2+2x+1 Which 2 statements are true regarding Intuit-approved QuickBooks Online apps? The area of a square piece of land is 784metersquared .What is the perimeter Who was the main Military organizer of the revolt at Sobibor? Rotate the given triangle 90counter-clockwise about theorigin [ 0 -3 5] [0 1 2 ] Baker Enterprises operates a midsized company that specializes in the production of a unique type of memory chip. It is currently the only firm in the market, and it earns $10 million per year by charging the monopoly price of $115 per chip. Baker is concerned that a new firm might soon attempt to clone its product. If successful, this would reduce Bakers profit to $4 million per year. Estimates indicate that, if Baker increases its output to 280,000 units (which would lower its price to $100 per chip), the entrant will stay out of the market and Baker will earn profits of $8 million per year for the indefinite future. 1. What must Baker do to credibly deter entry by limit pricing? 2. Does it make sense for Baker to limit price if the interest rate is 10 percent?