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
Please answer fast screenshot included - thanks in advance
aleksley [76]

Answer:

Webpage Layouts where finally designed using html code

Explanation:

4 0
3 years ago
Heather writes an essay for language arts and receives a poor grade. To figure out why she gets a poor grade, Heather looks at t
Kazeer [188]

Answer:

Glows and grows strat

Explanation:

4 0
2 years ago
Read 2 more answers
What are specific and relevant terms that will help you locate information using an internet search engine?
Liono4ka [1.6K]
I would say A:keywords

Hope this helps

I’m sorry if this is wrong

Have a great day/night
3 0
2 years ago
Tysm for Ace! :O<br> Hurray!
professor190 [17]

Answer:

Good job!! You deserve it.

Explanation:

3 0
2 years ago
Read 2 more answers
Select the correct answer.
Crank

Answer:

Sensing elements.

Explanation:

Sensing elements are the device which connect channels feedback and return it to the control system input. There are many sensors used for feedback control such as Tachometer, Encoders, Accelerometers and rate gyroscopes.

3 0
3 years ago
Other questions:
  • Rachel completed typing an official docment with a word processing program. She wants to make sure that her document has no typo
    15·2 answers
  • What can a person do to help increase their credit score? AUse only a small percentage of your credit limit. BResearch student l
    8·1 answer
  • Compose a program to examine the string "Hello, world!\n", and calculate the total decimal numeric value of all the characters i
    7·1 answer
  • Given two Generic variables, A with value "123" and B with value 456, what would the Write Line output of A + B be? 123456 579 A
    5·1 answer
  • Differentiate between the broadcasting and telecommunication
    5·1 answer
  • Write a Python program that reads the CSV file, compares the population estimates of every row for 2010 and 2017 and computes th
    10·1 answer
  • Sally needs to teach her class how to convert a decimal number to a binary number. What is the first step she should take to sta
    5·1 answer
  • Identify a factor that is unlikely to influence the length of time people wait in the lunch line.
    8·2 answers
  • Which of the following is not a type of Internet Job Board? Options Resume Blaster Professional Association Target Applicants We
    8·1 answer
  • Whate is function of northe bridge<br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!