Math, asked by masoomamalik, 1 year ago

can we use a for loop in a switch program?

Answers

Answered by Anonymous
1
yes...inside one case you can use all the methods and iterations...

masoomamalik: how can i write a program in which show whether a number is prime or nor by using switch case
Anonymous: well u can make only one case which will consist of prime no.
Anonymous: u will also need other options in a switch case
masoomamalik: i can't understand it..
Anonymous: i cangive u normal program for prime no.
Anonymous: but in switch case we need MORE OPTIONS
Answered by yuktijohri
1
Yes, we can use loop anywhere in a program.
Similar questions