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
Units for measuring computer memory
lyudmila [28]

A kilobyte (KB) is 1,024 bytes, not one thousand bytes as might be expected, because computers use binary (base two) math, instead of a decimal (base ten) system. Computer storage and memory is often measured in megabytes (MB) and gigabytes (GB). A medium-sized novel contains about 1 MB of information.

6 0
4 years ago
What is the syntax of an of if statement
Usimov [2.4K]
The syntax for a if statement is; The condition evaluates for either true or false. True is always a non-zero value, false is a value that contains zero
6 0
3 years ago
Which tool relies on the logged on user's certificate details to encrypt or decrypt files and folders? powershell bitlocker encr
grigory [225]
The tool relies on the logged on user's certificate details to encrypt or decrypt files and folders is the encrypting file system (efs).
It gives filesystem-level encryption as part of the improvement made on Microsoft Windows in version 3.0 of NTFS. This technology allows files to be visibly encrypted to secure confidential data from unsecured access to the computer. 
3 0
4 years ago
As a bank employee, you often work from home and remotely access a file server on the bank’s network to correct errors in financ
strojnjashka [21]

Answer:

TACACS+

Explanation:

Terminal Access Controller Access-Control System Plus (TACACS+) is a protocol that provides detailed accounting information and flexible administrative control over the authentication, authorization, and accounting process.

3 0
3 years ago
The implementation stage of the SDLC _____.
Karolina [17]

Answer:

d. involves analyzing end-user business requirements in order to refine project goals

Explanation:

In the software development life cycle, the implementation stage is the stage where the computer programmers begin the actual coding of the application required by the end-user. At this stage, the developer takes into account the needs and specifications of the customer.

For example, if the end-user wants a software application that can track payment records, the researcher at this stage begins using the right software to code programs that can effect this function.

6 0
3 years ago
Other questions:
  • In a pie chart showing showing the voting choices of 120 voters, the blue slice of pie is half of the pie. This means of 60 vote
    12·2 answers
  • Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri
    11·1 answer
  • A folder window shows you he contents of the folder
    8·1 answer
  • The hotspot created by MiFi is password protected and can be used to connect Wi-Fi devices located within ____ feet of the MiFi
    9·1 answer
  • Which of the following is not hardware? Question 7 options: A) Wireless network router B) Printer C) Virus Scanner D) Flat-panel
    11·1 answer
  • PROGRAM DESCRIPTION: In this assignment, you will write two complete C programs that will allow two players to play the game of
    12·1 answer
  • Is ryan patrick cullen gay
    7·2 answers
  • Why is it saying I don’t have a subscription when I paid for it and it shows deducted from my account? I can’t find any phone #
    7·1 answer
  • Sydnee would like a chart to appear once in her report, but she is having wouble making this occur She does not understand why t
    13·1 answer
  • Computer hardware refers to: Group of answer choices the mechanism through which users interact with a computer. handheld comput
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!