Write a program to find the series upto 10 terms:
3/1+4/2+5/3......
Answers
Answered by
2
Question
Write a program to find the series upto 10 terms:
3/1+4/2+5/3......
Answer:
import java.util.*;
public class Series
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int a,b,c,d=0;
for(a=1;a<=10;a++);
for(b=3;b<=13;b++);
for(c=3;c<=10;c++);
{
d=b/c+d;
System.out.println("The series is="+d);
}
}
}
Explanation:
Using for loop because the program is repeated for several times and it makes program short.
For more java programmings follow the given links.:
brainly.in/question/14797688
brainly.in/question/16088835
brainly.in/question/16195360
Similar questions