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
stellarik [79]
3 years ago
12

WRITE A JAVA PROGRAM TO PRINT THE PATTERN 13579 2468 357 46 5

Computers and Technology
1 answer:
Inessa05 [86]3 years ago
4 0

Answer:

import java.util.Scanner;

import java.lang.*;

class Main

{

  public static void main(String args[])

  {

     int n;

     //For capturing the value of n

     Scanner scanner = new Scanner(System.in);

     System.out.println("Enter the value of n:");

     //The entered value is stored in the var n

     n = scanner.nextInt();

     int k=1;

     printnum(n,k);  

  }

  public static void printnum(int n,int k)

  {

       if(n%2==0)

       {

       for(int i=k;i<=n-1;i=i+2)

            {

                System.out.print(i);

            }    

        System.out.println("");

       }

       else

        {

       for(int i=k;i<=n-1;i=i+2)

            {

                System.out.print(i);

            }    

        System.out.println("");

        }

      n--;

      if(n<=1)

      {

         System.exit(0);

      }

      else

      {

          printnum(n,k+1);

      }

   }

}

Explanation:

The program is self explanatory.

You might be interested in
An educational institution has a number of buildings in the campus. Each building has its own independent network system, and al
Aloiza [94]
Answer: star topology.

Explanation:

The layout of the way how the computers in a netword are interconnected is called network tipology.

Some types of network topologies are:

1) Point-to-point tipology: all the computers are connected to each other directly (computer-to-computer, in pairs, this is a direct link between each two computers).

2) Bus topology: all the nodes (computers or server) are connectect to a maing cable.

3) Star topology: all the computers are connected to a central computer or server which is called central hub. This is the layout described in the question.

4) Ring topology: the computers are connectec in a circular path; each computer is connected to the next computer.

5) Mesh: every computer is connected to every other computer.




8 0
2 years ago
Read 2 more answers
Which statement is true?
Klio2033 [76]

Answer:

You need to import the deque methods in order to use a deque.

Explanation:

the correct option is B

You need to import the deque methods in order to use a deque.

Please mark me as brainliest

5 0
3 years ago
Read 2 more answers
You are tasked to connect a new cable to an open port on the patch panel. Which of the following tools will you most likely use?
ki77a [65]

Answer:

A. Loopback tool

Explanation:

Loopback tool or adapter is a small device used to test networks ports and help identify simple network connection issues, this is a great tool when mapping out a physical layout of a network and quickly identify active ports on a switch.

This tool works by taking the transmitted signal and redirecting it or looping it back into the receiving end of the same connection.

3 0
3 years ago
Please help!!!!
alex41 [277]




Hi pupil here is your answer :::




➡➡➡➡➡➡➡➡➡➡➡➡➡



Your question :》 Which options are available when a user modifies a recurring appointment? check all that apply.


The answer is => A Open this occurenceand the option D Open the series are the option that shows from the dailog box that shows when attempting to modify the appointments .




⬅⬅⬅⬅⬅⬅⬅⬅⬅⬅⬅⬅⬅




Hope this helps .........
8 0
3 years ago
Design a circuit with the following criteria. Assume existence of +5V power supply. Draw your circuit and show your work. i. Inp
tresset_1 [31]

Answer:

see attached

Vin -5V- +5V

Input current : 500 x 10^-6 A

V_r: 0V 5V

I_r: 1 mA

Explanation:

Step 1: Circuit Designing: you have to address the question what is your proposed circuit going to do (its function).

Step 2: Decide on circuit components that can address each such circuit functions.

Step 3: Decide on the operational specification for the circuit: voltages, currents, frequencies etc.

Step 4: Simulate your circuit to confirm if it works as expected with simulation software such as Multisim.

4 0
3 years ago
Other questions:
  • I have a bag of trail mix.half of the bag contains peanuts.1/4of the bag is chocolates candies, and 1/4of the bag is dried fruit
    12·2 answers
  • How does this splitting wedge make work easier?
    15·1 answer
  • what is the gpa(grade point average) you need to have or you get kicked out of robotics for middle school?
    7·2 answers
  • Its a zoom call
    7·1 answer
  • Several NEC® sections contain the requirement to size conductors and overcurrent devices at 100 percent of the noncontinuous loa
    15·1 answer
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    5·1 answer
  • Fill in the blank
    15·2 answers
  • "Random Bars" is considered to be a Transition style<br> O True<br> O False
    11·1 answer
  • Why did Elena Gilbert Turn her humanity off when she was sired to Damon? (In The Vampire Diaries)
    14·1 answer
  • simplify the expression below and state the value of m for which the simplified expression is not defined 2m² + m - 15/ m² - 9​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!