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
Mademuasel [1]
3 years ago
6

What is output by the following program? int i = 7; while (i>=2){System.out.print (i +""); if ((i%3) == 0){ i +2; } else { i/

=2;}}
Computers and Technology
1 answer:
stiks02 [169]3 years ago
6 0

Answer:

The correct answer to this question is: "this program give an error".

int i = 7; //declare a variable(i) and assign value.

while (i>=2) //use loop and check condition.i greater then equal to 2.

{

System.out.print (i +""); //print value of i.

if ((i%3) == 0) //hold remainder

{

i +2; //error.

}

else

{

i/=2; //hold Quotient

}

}

Explanation:

In the above program, there is an error in the if block because it is not the correct way to declare. To use the variable from the correct output we use a variable like this.

Example

int i = 7;

//declare a variable(i) and assign value.

while (i>=2)

//use loop and check condition.i greater then equal to 2.

{

System.out.print (i +""); //print value of i.

if ((i%3) == 0) //hold remainder

{

i =i+2;

}

else

{

i/=2; //hold Quotient

}

}

Output: 732

You might be interested in
Discuss what they need to consider if they wish to use their devices when they are away from home?
ANTONII [103]

Below are suggestions Ryan and Michael should be aware or when travelling away from home with portable personal digital devices.


Portability: This includes the size and weight. Always keep portable equipment like phones and laptops in your possession every time.

Power adapters or chargers: At one point, you will need to recharge your phone or laptop. Bring your charger, plug adapter or a voltage converter if traveling overseas.

Mobile networks or Data roaming charges: When traveling overseas, it is worth noting that your data plan will probably be very expensive. Be sure to turn off 3G and push services and disable notifications.

Connectivity and availability of the internet: Doing a research on the connectivity well before your departure date is vital. Ensure to find out whether free wireless is offered at your hotel. If you must connect to any public hot-spots, be careful not to enter personal information like passwords and credit cards numbers.

Personal security and the security of the device: If you are set to travel to a dangerous part of the world, leave your expensive electronics behind and find alternative ways of how you can stay in touch with family and friends








<span />
3 0
2 years ago
Friday Night Funkin Fans, does this count as a leak if I share it?
Aliun [14]
Hmm no I don’t think so
7 0
2 years ago
Read 2 more answers
Choose the true statement below. Question 8 options: A) The content that displays in the browser is contained in the head sectio
Rzqust [24]

Answer:

a. The content that displays in the browser is contained in the head section.

5 0
3 years ago
WILL GIVE BRAINLIST IF ANSWERED RIGHT 1. An engine's _______ contains the cylinder block, the cylinders, the piston, the connect
miss Akunina [59]
First three are c b and d
3 0
2 years ago
Read 2 more answers
Networking device converts analog signals to digital ones?
iren2701 [21]

Solution:

An analog-to-digital converter, or ADC as it is more commonly called, is a device that converts analog signals into digital signals. Analog information is transmitted by modulating a continuous transmission signal by amplifying a signal's strength or varying its frequency to add or take away data.

This is the required answer.

5 0
2 years ago
Other questions:
  • What role do career pathways play?
    11·2 answers
  • A form of speech that is used to clarify, describe, demonstrate, and/or explain is referred to as _____.
    7·2 answers
  • How was windows 3 installed on a pc?
    11·1 answer
  • If you want to write some fancy interface on your computer with expanded communication to the Arduino, what library should you u
    13·1 answer
  • All of the following are aspects of the search process except?
    6·2 answers
  • Who is a second-degree contact on a professional networking profile?
    12·1 answer
  • What is the importance of human flourishing to science and technology?​
    8·1 answer
  • In terms of technology, wich of the four devices is the most recent?
    7·1 answer
  • Computers that are joined together are called networks true or false
    10·1 answer
  • In cells D6 through D8, enter formulas to calculate the values of the stocks. The formulas should multiply the number of shares
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!