Computer Science, asked by maihuterimaa, 1 year ago

SOLVE THIS JAVA PROGRAMMING PLEASE​

Attachments:

Sumanmi: are you from odisha?

Answers

Answered by nain31
2
 \bold{ABOUT \: JAVA}

Java is a machine independent language which can work on any platform. Its an object oriented programming which stress on object rather than data.

The main parts while doing Java programming are package, Class ,input variables, condition updating.

 \boxed{CODING}

import java. util. *;

class choice

{

public int factorial(int n)

{

int i,f=1;

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

{

f=f*i;

}

return(f);

}

public void call()

{
double s:

int k, l, p :

for(k=1 ;k<=10 ;k++)

{

p=1;

for(l=1 ;l<=10 ;l++)

{

p=p*l;

}

s=s+1/p;

}

System . out . println("The sum of series is"+s);

}

public static void main(String args[])

{

int a, b;

Scanner Sc=new Scanner(System . in);

System . out . println("Enter any number");

a=Sc . nextInt();

choice obj=new choice();

b=obj . factorial(a);

System . out . println("Factorial of number is"+b);

obj. call();

}

}

Sumanmi: are you an icseian?
nain31: yeah
maihuterimaa: thanks
maihuterimaa: gamma ..mere baaki questions solve krde please
nain31: lol namu
maihuterimaa: hehee
maihuterimaa: hn
Similar questions