Skip to content

Abdullah06444/0017_FunctionsSample2

Repository files navigation

0017_FunctionsSample2

Sample Exercise

You write a function that determines whether a given number is a pentagonal number or not. For this purpose, you will write isPentagonal function, which takes a positive integer and returns 1 if the given number is a pentagonal number; returns 0, otherwise. A number of sample pentagonal numbers are depicted below:

image