Computer Science, asked by FGFGY, 11 months ago

Write a program to display the following series upto 10 terms:
4,16,36......................................

Answers

Answered by Anonymous
2

import java.util.*;

public class Series

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in)

int n,m;

for(n=2;n<=20;n=n+2)

{

m=math.pow(n,2);

System.out.println("Display the series"+m);

}

}

}

Answered by mustafa3952
0

Answer:

#include <stdio.h>

int main()

{

int i, n, t1 = 0, t2 = 1, nextTerm;

printf("Enter the number of terms: ");

scanf("%d", &n);

printf("Fibonacci Series: ");

for (i = 1; i <= n; ++i)

{

printf("%d, ", t1);

nextTerm = t1 + t2;

t1 = t2;

t2 = nextTerm;

}

return 0;

}

Explanation:

Hope the above answer helps you. The above answer contains the correct information about your question. Please mark my answer as the brainliest and say thanks for the answer. Follow me

Similar questions