write a program to display the series upto 10th terms
: 1,9,25,49.............................................
Answers
Answered by
4
import java.util.*;
public class Series
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int a,i;
for(i=1;i<=19;i=i+2)
{
a=i*i;
System.out.println("Display the series"+i);
}
}
}
Answered by
2
#include<stdio.h>
int main() {
int n,i;
int sum=0;
printf("Enter the n i.e. max values of series: ");
scanf("%d",&n);
sum = (n * (n + 1)) / 2;
printf("Sum of the series: ");
#( ˘ ³˘)♥
Similar questions