27) Write a program to display the
series 1,9,25,49..till Nth term. Total
number of terms should be input
from user. Also, program should
display sum of the series. (5 marks)
Answers
Explanation:
Ignition temperature is an important property of any fuel because the combustion reaction of the fuel becomes self-sustaining only above this temperature. ... When the fuel is heated by some external means, the rate of exothermic reaction increases with a corresponding increase in the heat generation rate
Answer:
package com.company;
import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner sc = new Scanner (System.in);
System.out.println("Enter the N Term: ");
int n = sc.nextInt();
int n1 = n*2;
int s;
int s1 = 0;
System.out.print("The series: ");
for (int i = 1; i<=n1 ; i+=2 )
{
s = i*i;
System.out.print(s+" ");
s1 = s1+s;
}
System.out.println(" ");
System.out.println("The Sum of the Series: "+s1);
}
}