+ 2
What are palindrome ,Armstrong , Fibonacci numbers in C programming??
And from where can we study more about them??
2 odpowiedzi
+ 6
A palindrome number is a number that is exactly the same number when written backwards.
http://www.programmingsimplified.com/c/source-code/c-program-palindrome-number
Example: 12021
An Armstrong number is when the number's individual numbers are equal to a power:
https://www.programiz.com/c-programming/examples/check-armstrong-number
Example: 371 = 3*3*3 + 7*7*7 + 1*1*1
A Fibonacci number is a row of numbers that increases by adding the previous two numbers with : Tn = T(n-1) + T(n-2)
https://www.programiz.com/c-programming/examples/fibonacci-series
Example: 1,1,2,3,5,8,13,21,35
0
The land mark store is in the nth floor. Annie gets into the lift in the ground floor. The lift that Annie gets in does not stop in all the floors. It stops in only 3 floors numbered n1,n2 and n3. She wants to get down in the floor that is closer to n. If there are 2 choices, she always prefer to climb down the stairs rather than climbing up. Help Annie in deciding the floor she should get down from the lift. When she enters the input which is less than 0,it should tell her that “Invalid floor number”. Write a Pseudocode for this scenario.