+ 1
C++, how I can make a code giving me triangular numbers I'm still a beginner
8 ответов
+ 2
Take the numbers on the left side of the triangle they'll give you numbers
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666.. as that link says, I see no difference
+ 1
What do you mean by triangular numbers?
+ 1
Producing this sequence
1,4,9,16,25,36
+ 1
just make a function that returns the square of the number, and have an incrementing value, and print the result.
And they are never called triangle numbers.
They are called square numbers
+ 1
They are called triangular numbers when you draw the triangle,,,,, such that on the right end you have an increasing number of square numbers, and on the right you have the triangular numbers,, I was simplifying
+ 1
1. You said the sequence is 1, 4, 9, 16, 25, 36
2. I already gave you a guide for the code
0
Can I get a guide for the codes