Write a program in java to print the following series:-
1/2,1/3,1/4……………1/n
Answers
Answered by
0
im skipping class and psvm steps...
import java.util.*;
class...
{
psvm()
{
Scanner sc= newScanner (System.in);
S.o.p("enter your choice");
int num= sc.nextInt();
double x= 1.0;
for (int i= 2;i<=num;i++)
{
S.o.p(x/i);
}
}
}
Similar questions
Accountancy,
7 months ago
Science,
7 months ago
Environmental Sciences,
7 months ago
Science,
1 year ago
CBSE BOARD X,
1 year ago
Math,
1 year ago
Physics,
1 year ago