Computer Science, asked by sangrish03p58hbs, 1 year ago

Write a program in java to print the following series:-
1/2,1/3,1/4……………1/n

Answers

Answered by Anonymous
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