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
6. What is saddle-stitch binding?
kifflom [539]
Commonly known as book stapling, ‘saddle stitched’ is one of the most popular binding methods. The technique uses printed sheets which are folded and nestled inside each other. These pages are then stapled together through the fold line. Saddle stitched binding can be applied to all book dimensions and both portrait and landscape orientation.
5 0
3 years ago
Read 2 more answers
Students at a residence hall are reporting internet connectivity issues. The university’s network administrator configured the r
alisha [4.7K]

Answer: D) DHCP snooping

Explanation:

 DHCP stand for the dynamic host configuration protocol and it is basically use as the DHCP server. It provide the IP address to each device in the network and it is used to communicate with the other IP network.

According to the question, the student device basically receive the IP network and it is an unauthorized DHCP server which uses denial of service attack for several purposes.

DHCP snooping is basically use to prevent from such unauthorized device which gives the IP address to the clients. DHCP is the two layer security system technology that is bulit in the operating system.

7 0
3 years ago
How would our life be without technology at school? please
insens350 [35]
IS THIS AN ESSAY PLEASE LET ME KNOW SO I CAN TYPE IT IN COMMENTS
5 0
3 years ago
From the perspective of the prosecution, the safest legal means of obtaining incriminating documents from a suspect is by: a. Su
never [62]

Answer:

a. Subpoena duces tectum

Explanation:

<u>Options C </u>(an informant steal the documents)<u> and D</u> (discrete copy of the documents) <u>would be considered illegal and/or inadmissible in most places</u>, so you should avoid these.

Options A (subpoena) and B (search warrant) are usually issued by a judge after considerations, so they are both legal ways to obtain something.

In a subpoena duces tecum, the court orders an individual (or a moral person) to produce (usually very specific) documents to court or face penalty.

<u>A search warrant is executed by law enforcement officials who are seeking information to help in their investigation</u>, usually not highly specific (not 'search for a copy of the April 10 minutes of the meeting.').

3 0
4 years ago
Using recursion, write a program that asks a user to enter the starting coordinates (row, then column), the ending coordinates (
Luden [163]

Answer:

The program in Python is as follows

def Paths(row,col):

if row ==0 or col==0:

 return 1

return (Paths(row-1, col) + Paths(row, col-1))

row = int(input("Row: "))

col = int(input("Column: "))

print("Paths: ", Paths(row,col))

Explanation:

This defines the function

def Paths(row,col):

If row or column is 0, the function returns 1

<em> if row ==0 or col==0: </em>

<em>  return 1 </em>

This calls the function recursively, as long as row and col are greater than 1

<em> return (Paths(row-1, col) + Paths(row, col-1))</em>

The main begins here

This prompts the user for rows

row = int(input("Row: "))

This prompts the user for columns

col = int(input("Column: "))

This calls the Paths function and prints the number of paths

print("Paths: ", Paths(row,col))

4 0
3 years ago
Other questions:
  • A(n) ________ signal is a discrete, binary waveform that transmits data coded into two discrete states such as 1-bits and 0-bits
    12·1 answer
  • Data ____________ refers to any technique that recodes the data in a file so that it contains fewer bits.​
    10·1 answer
  • It is possible to have motion in the absence of a force
    13·1 answer
  • Earthquakes _____.
    9·2 answers
  • ____ allows you to control how objects enter, move on and exit slides
    13·1 answer
  • Why was it important for the date format to be standardized by the
    7·1 answer
  • Please tell fast plzzzzzz​
    6·1 answer
  • Dwayne wants a variable called "name" to appear in the interpreter and does not want a space after it. Which of these should be
    11·1 answer
  • Please help!
    6·1 answer
  • Fiscal policy includes each of the following except? 1) the money supply. 2) taxes. 3) government spending. 4) the automatic sta
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!