Program to Display the Series 1, 4, 9, 16, 25
How to write a program to display the series 1, 4, 9, 16, 25 by using one or two variables?
Answers
Answered by
0
the logic will be
n is taken for number of elemnts in the series
int i,n;
for(i=1;i<=n;i++)
{
print(i*i);
}
n is taken for number of elemnts in the series
int i,n;
for(i=1;i<=n;i++)
{
print(i*i);
}
Similar questions