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
sesenic [268]
3 years ago
12

Java public class Odds { public static void main(String[] args) { printOdds(3); printOdds(17/2); int x = 25; printOdds(37 – x +1

); } public static void printOdds(int n) { for (int i = 1; i <= n; i++) { int odd = 2*i -1; System.out.print(odd + " "); } System.out.println(); } }
Write the output.
Computers and Technology
1 answer:
Serggg [28]3 years ago
5 0

Answer:

The output of the given program is :

1 3 5

1 3 5 7 9 11 13 15

1 3 5 7 9 11 13 15 17 19 21 23 25

Explanation:

The description of the following program can be given as:

  • In the given java program firstly we define a class that is "Odds". In this class, we define the main method. In this method, we call printOdds() function three times.  
  • In the first time calling, we pass 3 in the function parameter. So the function print 3 odd number that is 1 3 5.
  • In the second time calling, we pass value 17/2 in function parameter which is 8. So, the function print 8 odd number that is 1 3 5 7.....15
  • In third time calling we define an integer variable that is x in this variable we assign value that is 25 and call function that calculates value (37-x+1) that is 13. So, the function print 13 odd numbers that is 1 3 5 7..........25.
  • In the last, we define the printOdds() function that is outside the class that prints odd numbers.
You might be interested in
Red + blue =<br>Red + green =<br>Magenta - blue =<br>Yellow - green =<br>Cyan - blue =​
vodomira [7]

Answer:

red + blue is green

red + green is blue

4 0
3 years ago
You would like to set up an online meeting to communicate with colleagues on a group project. Which of these tools should you su
shtirl [24]
The answer is webex
you can have meetings on there
7 0
4 years ago
Analyzing Uses for PDFs
Sauron [17]

Answer:

You need to send a file to someone who does not have Word

Explanation:

In this case the answer is You need to send a file to someone who does not have Word.

But we use PDF to send files without changing its format.

4 0
3 years ago
A new company will have 40 workstations in one building sharing a single network. All users must be able to share ¬les and print
kobusy [5.1K]

Answer:

Domain Networking.

Explanation:

A domain in networking refers to any group of workstation,users,printers devices ,database servers and computers which share different type of data via resources of network.

Hence domain networking will be the best option for the company having 40 workstation in a single building sharing a single network.

6 0
3 years ago
State the Limitations of the first generation of computers​
Ivanshal [37]

Answer:

The limitations of the first generation of computer are:-

•The operating speed was very low.

•Power consumption was very high.

•They required large space for installation.

<h2>Hope it helps you.</h2>
3 0
3 years ago
Other questions:
  • Throughout the course we have covered a lot of topics in relation to information systems. Select one or two of the major topics
    14·1 answer
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Discuss whether the redundant data should be addressed prior to beginning the wireless network architecture project, in coordina
    11·1 answer
  • Devon would like to install a new hard drive on his computer. Because he does not have a SATA port available on his motherboard,
    7·1 answer
  • What is cyber ethics​
    10·2 answers
  • In the following code: function drawCircle(radius, x, y, color) { var circle = new Circle(radius); circle.setPosition(x, y); cir
    7·1 answer
  • Consider the following declaration:
    9·1 answer
  • Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
    12·1 answer
  • Can anyone figure this out???? I need help ASAP!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!