subject

A pentagonal number is defined as n(3n – 1)/2 for n=1,2,..., and so on. Therefore, the first few numbersare 1,5,12,22,... . Write a method with the following header that returns a pentagonal number:public static int getPentagonalNumber(int n)
Using Java, write a test program that uses this method to display the first n pentagonal
numbers with 10 numbers on each line, one space between each number, and the user entering the integer value for n.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:50
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
You know the right answer?
A pentagonal number is defined as n(3n – 1)/2 for n=1,2,..., and so on. Therefore, the first few num...
Questions
question
Biology, 07.05.2021 17:00
question
Mathematics, 07.05.2021 17:00
question
Mathematics, 07.05.2021 17:00
question
Social Studies, 07.05.2021 17:00
question
Mathematics, 07.05.2021 17:00
question
Mathematics, 07.05.2021 17:00
Questions on the website: 13722367