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
Allushta [10]
3 years ago
5

Suppose that the code below is the body of some loop. Given variables x and y write some code that reads a value into the variab

les, respectively, then prints out the value of x divided by y. Use a continue statement to make sure that nothing is written to court when y is 0.
Computers and Technology
1 answer:
ra1l [238]3 years ago
4 0

Answer:

I will code in JAVA.

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

     float x;

     float y;

     float result;

     Scanner input = new Scanner(System.in);

     while(true){ <em>//this is an infinite loop</em>

       x = input.nextFloat(); <em>//wait the input for x</em>

       y = input.nextFloat(); <em>//wait the input for y</em>

       if(y == 0) {

         continue; <em>//next iteration without print.</em>

       } else{

         result = x/y;

         System.out.print(result); <em>//print the result.</em>

       }

     }

 }

}

Explanation:

To get the numbers, you need to import Scanner class, and use the method nextFloat() to admit floats and integers.

If y is 0 then, executes the continue statement, if not prints the division between x and y.

You might be interested in
A tornado destroyed many
m_a_m_a [10]

Answer:

D is your answer because I'm an expert

5 0
3 years ago
Read 2 more answers
PLEASE ANSWER LAST DAY OF SCHOOL. Discussion Topic
meriva

Answer:

You can't really say it matters whether it's short or long

Explanation:

There several coding language some short and some long with different purposes so it doesn't really make a difference

Although some coders have been able to shorten some codes so I'd say shorter is faster and be[er and easier to memorize

Thanks hope I was helpful

4 0
1 year ago
When you save a drawing using paint, it's automatically stored as a?
serious [3.7K]

Answer:

Bitmap File

Explanation:

6 0
3 years ago
#Electrical Engineering
GrogVix [38]

Answer:

yes

Explanation:

where's our question

5 0
3 years ago
Suppose we have a video camera that produces video data at the rate of 2gb per hour. Recording for 15 minutes
saul85 [17]
If it was recording for 15 minutes it would use 0.5gb because 1gb is 30 minutes and so halfing that would be 0.5gb for 15 minutes.
3 0
3 years ago
Other questions:
  • Which of the following is important to do when downloading a game to your
    8·1 answer
  • Please help me I just bought a camera and I really wanna shoot in manual mode but I have like the basics down Shutter speed is l
    9·1 answer
  • Dang was accepted to a biology program with a rigorous schedule and a high tuition, but good professors. What would be a benefit
    10·2 answers
  • What is an elliptic curve cryptosystem (ECC)?
    8·1 answer
  • What steps should a user take to create a secondary address book?
    8·2 answers
  • What effect on total current flow will a shorted series component have in a series-parallel circuit?
    8·1 answer
  • س2) اکتب خوارزميه لحل المعادلة الرياضيه الاتيه
    9·1 answer
  • Only need help on f and correct me if im wrong for the other questions please
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    6·1 answer
  • A leading global vendor Of computer software hardware for computer mobile and gaming systems and cloud services it's corporate h
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!