write a java program to print following :1/7, 2/11,3/13...n terms
Answers
Answered by
5
Explanation:
public class KboatPattern
{
public void displayPattern() {
int a = 1;
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(a++ + "\t");
}
System.out.println();
}
}
}
Answered by
0
Answer:
Given a number N, the task is to find the Nth term of this series:
3, 7, 13, 21, 31, …….
Examples:
Input: N = 4
Output: 21
Explanation:
Nth term = (pow(N, 2) + N + 1)
= (pow(4, 2) + 4 + 1)
= 21
Input: N = 11
Output: 133
Similar questions