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
Ray Of Light [21]
2 years ago
12

Create a basic program that accomplishes the following requirements: Allows the user to input 2 number , a starting number x and

ending number y Implements a while loop that counts from x (start) to y(end). Inside the loop , print to the screen rather the current number is even or odd If the number is even , multiply by the number by 3 and print the results to the screen. If the number is odd , add 10 and print the results to the screen. Use at least 1 increment or decrement operator.
Computers and Technology
1 answer:
katrin [286]2 years ago
6 0

Answer:

Explanation:

The following program is written in Java. It asks the user for the two inputs and then uses those inputs in a for loop. The loop goes through each number checking to see if it is even or odd. If it is even it prints out Even: and the number after multiplying it by 3. If it is odd it prints out Odd: and the number after adding 10 to it. The output can be seen in the attached picture below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number 1: ");

       int num1 = in.nextInt();

       System.out.println("Enter number 2:");

       int num2 = in.nextInt();

       for (int x = num1; x <= num2; x++) {

           if ((x % 2) == 0) {

               System.out.println("Even: " + (x*3));

           } else {

               System.out.println("Odd: " + (x+10));

           }

       }

   }  

}

You might be interested in
What could have made you redesign your plan? Select 3 options.
Masteriza [31]

Answer:

so that their username will still be used and so the can renember the username

Explanation:

that is why

5 0
2 years ago
Which of the following best describes a balanced reaction
Ghella [55]

Answer:c

Explanation:

just took the test

7 0
1 year ago
Structured walk-throughs take place throughout the SDLC and are called _____ reviews, depending on the phase in which they occur
Tpy6a [65]

Answer:

design

Explanation:

Based on the information provided within the question it can be said that these are called design reviews. This is one of the most important parts of the development of a system. This focuses more on answering how something is going to be done in the system as opposed to answering what is going to be done for the system depending on the questions asked in the analysis phase.

5 0
2 years ago
Debevec mentions using the technology he described to animate entire human bodies. Discuss why you think this is or is not a goo
snow_tiger [21]

Answer:

Debevec is using the light of his team because this and that and because it’s manipulated

Explanation:

8 0
2 years ago
Match the careers with the career clusters.
creativ13 [48]
<h2>Answer and Explanation:</h2>

The picture shows the right careers with their respective career clusters.

4 0
2 years ago
Read 2 more answers
Other questions:
  • To change the background color of a page, which tab would you use?
    15·2 answers
  • Different between ocular and compound miscroscope
    13·1 answer
  • When introducing new devices to the network, the organization's security policy requires that devices be monitored to establish
    15·1 answer
  • When comparing different biometric systems, one of the most important metrics used is called the _________, which represents the
    14·1 answer
  • How to solve household arithmetic​
    7·1 answer
  • Informed _________ will better manage complexities and enable more efficient manufacturing of goods.
    13·1 answer
  • You are shooting water balloons with a slingshot. One water balloon goes twice as far as another. Which of the following is the
    8·1 answer
  • Can somebody PLEASE help me cancel my subscription I have tried so many different things and contacted support - they are no hel
    14·1 answer
  • The memory used by the CPU to temporarily hold data while processing is called _______. random access memory central processing
    5·1 answer
  • What is one of the advantages of using an algorithm to solve a puzzle like Kriss-Kross or Sudoku?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!