C Program To Print 1+4+9+16+25 Series, using While Loop

preview_player
Показать описание

Lets write C program to print/display number series 1 + 4 + 9 + 16 + 25 + using while loop.

Logic To Print 1+4+9+16 number series using while loop
If we analyze the number series, its just addition of square of natural numbers. i.e., (1 x 1) + (2 x 2) + (3 x 3) + (4 x 4) + (5 x 5) + .. etc

We ask the user to enter a number. If user enters num = 5, then we display the first 5 numbers in the series i.e., 1 + 4 + 9 + 16 + 25 +

If user enters num = 10, then we display the first 10 numbers in the series i.e., 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 + 81 + 100 +

C Programming Interview / Viva Q&A List

C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

tnks bro ur program hlp me understand concept that how we make this sequence

ahmaddar
Автор

How can we print 1 4 27 256 3125 using for loop

whatkhushidoes
Автор

Please sir solve this series by while term)

tiwarianjali
Автор

How to calculate of this series

Plz solve this problem.
Plz...

_Nickel_MdSayfulIslam