The ancient Greeks classified numbers geometrically. For example, a number was called “triangular” if that number of pebbles could be arranged in a symmetric triangle as shown in the figure below. The first ten triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, and 45. Write a C++ program that takes as input anumber N and prints whether it is triangular or not.

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
1st Edition
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Chapter3: Computers And Mobile Devices: Evaluating Options For Home And Work
Section: Chapter Questions
Problem 17SG
icon
Related questions
Question

The ancient Greeks classified numbers geometrically. For example, a number was called “triangular” if that number of pebbles could be arranged in a symmetric triangle as shown in the figure below. The first ten triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, and 45. Write a C++ program that takes as input anumber N and prints whether it is triangular or not.

T,-1 T;-3
T;= 6
T=10
Ts= 15
Transcribed Image Text:T,-1 T;-3 T;= 6 T=10 Ts= 15
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning