Question: Programming language is C++ PA 12-1 (25 points) A pentagonal number is defined as n(3n-1)/2 for integers1. The first numbers are 1, 5, 12, 22,
Programming language is C++

PA 12-1 (25 points) A pentagonal number is defined as n(3n-1)/2 for integers1. The first numbers are 1, 5, 12, 22, Write a function with the following header getPentagonalNumber (int n) that returns one pentagonal number. In main() call the function to display the first 20 pentagonal numbers D:CodeBlocks-EP1CodeBlocks-EP 1 12 35 51 70 92 145 176 210 247 287 330 376 425 477 532 590
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
