C Program To Print 1+4+9+16 Series, using For Loop
Satish B
https://technotip.com/7642/c-program-to-print-1-4-9-16-series-using-for-loop/
Lets write C program to print/display number series 1 + 4 + 9 + 16 + 25 + using for loop.
For Loop Logic We initialize count to 1, as the number series starts from 1. We iterate for loop until count is less than or equal to user entered limit. For each iteration of the for loop we increment the value of count by 1.
Inside for loop we square the value of count and print the result, for each iteration of for loop.
Example: We ask the user to enter a number. If user enters limit = 5, then we display the first 5 numbers in the series i.e., 1 + 4 + 9 + 16 + 25 +
C Programming Interview / Viva Q&A List http://technotip.com/6378/c-programming-interview-viva-qa-list/
C Programming: Beginner To Advance To Expert http://technotip.com/6086/c-programming-beginner-to-advance-to-expert/ ... https://www.youtube.com/watch?v=rUrSZ1PMnOU
4340888 Bytes