Computer Science, asked by umdsmm, 2 months ago

Write a Menu driven program to display the following series 9 99 999 9999 99999.....n and 3!+5!+7!+9!+11!

Answers

Answered by sumithrasumi2215
3

Answer:

import java .until.*;

public class Series

{

public static void main ()

{

Scanner sc=new Scanner (System.in);

int ch;

System.out.println("ENTER YOUR CHOICE");

ch=sc.nextInt ();

Switch (ch)

{

case 1:

int I,s=0,a,n;

System.out.println("ENTER YOUR NUMBER");

n=sc.nextInt ();

do

{

I=10;

s=s*I;

a=s-1;

}

while (a<n)

System.out.print(a". ");

}

break;

case 2:

int=I,s=0,n;

System.out.println("ENTER YOUR NUMBER");

n=sc.nextInt ();

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

{

s=s+1;

if(s%i!=0)

System.out.print(s+"!");

}

break;

default:

System.out.println("WRONG CHOICE ");

}

}

}

Answered by BhaswatiRay
3

Answer:

Please umdsm explain your question nicely so that I would be able to answer it. ok my friend

Similar questions