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, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
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
Mathematics, 22.06.2021 01:40
question
Mathematics, 22.06.2021 01:40
Questions on the website: 13722363