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
Which of the four digital-to-analog conversion techniques (ASK, FSK, PSK or QAM) is the most susceptible to noise? Defend your a
grigory [225]

Answer:

ASK

Explanation:

The correct answer is ASK which denotes Amplitude Shift Keying. This is essentially a type of amplitude modulation which represents the binary data that comes varied forms right in the amplitude of a signal.

Now the reason why It is the most susceptible technique to noise is due to the fact that between frequency, phase & amplitude, amplitude is the one that is most susceptible to being affected by noise when compared to the other two.

3 0
2 years ago
Assume you're using a three button mouse. to access shortcut menus, you would
Likurg_2 [28]
<span>Normally you would click the right hand/secondary mouse button but you may configure any of the buttons to work within the Keyboard and Mouse section of System Preferences.
Hope this helps:)</span>
6 0
3 years ago
Read 2 more answers
NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for li
Andrews [41]

Answer:

a and b. 250.4(A)(1) Note

Explanation:

4 0
2 years ago
How can the connection to salesforce be restricted only to the employee portal server? Universal containers (UC) uses a legacy E
Ad libitum [116K]

Answer

To restrict the connection only to the employee portal server, the IP address of the application should be added into the list of Trusted IP's.

Explanation:

Trusted IP's are the IP's that are used to identify the users that can be verified easily. Those users whose IP's are not listed in the trusted IP list needs to verify their identity by sending them login code on each transaction.

<em>In above mentioned case, We need to enlist the IP address of employee portal list in trusted IP list to ensure the restriction of login to employee only.</em>

4 0
3 years ago
When did the first usb flash drive appear on the retail market? Which company developed this storage medium?
jeka57 [31]

The first commercially-available USB flash drive was the "ThumbDrive," produced by Singapore company Trek Technology in 2000. The drive had capacities of

8 MB

64 MB

1.44 MB

256 MB

7 0
3 years ago
Other questions:
  • What is one way for an entrepreneur to decrease risk?
    8·1 answer
  • I will mark brainalist! ​
    5·1 answer
  • How is the EF​ computed? A. ES​ + Activity time B. LF minusActivity time C. ​Min{LS of all immediate following​ activities} D. ​
    11·1 answer
  • Rachel wants to post content from digital cameras on the web. Which online tool will help Rachel to post and edit content on a w
    5·1 answer
  • Solve the following quadratic equation <br><br>y=6x^2-12x+1
    9·1 answer
  • . Let F(X, Y, Z)=(X + Y + Z)(X + Y + Z)(X + Y + Z)(X + Y + Z). Use a 3-variable K-Map to find the minimized SOP form of this fun
    15·1 answer
  • I keep getting this error: postfix.cpp: In function ‘double RPN_evaluation(std::string)’: postfix.cpp:42:26: error: cannot conve
    7·1 answer
  • This isn't a question
    8·1 answer
  • What is media ethics. Explain two forms of maintaining media ethics with examples​
    13·1 answer
  • During the ___ phase of a software development project, members broadly define the features that the software should include
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!