Home > Backend Development > C++ > C program to find decagon numbers?

C program to find decagon numbers?

WBOY
Release: 2023-08-31 23:09:07
forward
1430 people have browsed it

Decagonal numbers are graphics derived using the concepts of triangular numbers and square numbers. Extensions of this number pattern are created using non-rotationally symmetric numbers. This number for nested decagons is given by the number of points in the number of nested decagons created.

For example, for the 3rd decagon number, 3 decagon numbers are nested in iX times the number of sides of the decagon. As shown in the picture-

C program to find decagon numbers?

The side of the first external figure = 30

The side of the second external figure = 20

Inner picture Edges in = 10

All shared edges = 6 2

Total = 30 20 10-(6 2) = 52

This result is generalized using the formula 4n2 - 3n .

This gives the decagonal number of n

The above is the detailed content of C program to find decagon numbers?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template