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]
3 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]3 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
How do you loop a makebeat in earsketch
Anettt [7]

Answer:

i dont know if this help but To do this, we will use a 'for loop'. The “for loop” allows the programmer to call a section of code repeatedly within a range of values. The range() function will return integer values depending on the arguments.

Explanation:

5 0
3 years ago
You are configuring NIC teaming on a server with two network adapters. You chose Switch Independent Mode. You now must choose be
zmey [24]

Answer:

The appropriate answer is "Active/Active mode".

Explanation:

  • Now just after the customers or clients respond to the traditional standards, the board is comprised the information rapport with the cloud service, which would be considered as Active mode.
  • The car glides primarily somewhere at a specified constantly controlled rate of the conductor. Currently entering the grounding connection boosts the flow of electrons further into the receiver as well as the transmitter.

Thus the above is the correct solution.

3 0
3 years ago
Suppose that f(x)=4x-1 and g(x)=-2x+5. For which values of x is f(x)&gt;0?​
Ksenya-84 [330]

Answer:

f(x) = 4x -1

Consider the scenario when f(x) =0,

4x-1=0

x=1/4

Hence when x is more than 1/4, f(x) will be more than 0. This can be observed too by drawing a linear graph.

Explanation:

7 0
3 years ago
25POINTS
gregori [183]

Answer:

the answer would be A

Explanation:

4 0
3 years ago
Before taking the boat out for an excursion, it is always a good idea to let someone know you are leaving. Which would be the be
Iteru [2.4K]

The best way to let someone know you are leaving on an excursion with a boat is: by filing a boat plan.

A boat plan is also referred to as a sail plan or float plan and it can be defined as a paper document that outlines a traveler's itinerary and other important information while on water.

Generally, a boat plan comprises the following important information about traveler and the trip:

  • Name
  • Owner's address
  • Telephone number
  • Destination
  • Safety equipment on board
  • Date and time of departure
  • Number of persons on board.

Ideally, it is a good idea to ensure that you inform a friend or family before taking your boat out for an excursion. Also, the best way to accomplish this is to file a boat plan.

Read more on here: brainly.com/question/10339634

8 0
3 years ago
Other questions:
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • Which access database object is best to use for the basis of a report when specific criteria must be applied to the report?
    12·2 answers
  • Write the difference between:
    14·2 answers
  • What does pdf stand for?
    10·1 answer
  • How does having weak security on your browser represent the weakest link in a network
    8·1 answer
  • Beth wants to add information to her powerpoint presentation that is hiden from her audience and only she will see. Which featur
    5·1 answer
  • Which of the following can help organize your email messages? Select all that apply.
    13·2 answers
  • Hey, can you guys please help me please??
    14·1 answer
  • During the POST process, the BIOS uses two (2) different ways to notify you of a problem, Error beep codes and error messages, e
    10·1 answer
  • Which protocol is often used in conjunction with ipsec to provide a remote access client vpn with user authentication?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!