Computer Science, asked by tanushreeshankar, 1 year ago

I want to ask a question about C programming


How am I suppose to do a program using switch (case) and while statement only??


Can anyone give me an example. I'm blank out

I'm using code blocks btw

Answers

Answered by Anonymous
0

You should do it by taking switch()

and the start case and inside the case take while loop

Mark as brainlist


tanushreeshankar: Give me example
tanushreeshankar: Okay let say i want to calculate resistance for 5 resistor. My case will be series and parallel. What should I write in my while statement() ???
darmudasir417: then i have to snd u a pdf
tanushreeshankar: Okay where is it? K I need in C
darmudasir417: but I cant send u in comments here
tanushreeshankar: Send in message can ah?
darmudasir417: can't even send through messages
darmudasir417: u r on social media
tanushreeshankar: Ooh.okay. neverminelah. Nope not in social media
darmudasir417: ok sorry then cant help
Answered by darmudasir417
0

switch(expression)

{

case 1:

            statement;

             break;

case 2:

            statement;

             break;

.

.

default:

            default statement;

             break;

}


tanushreeshankar: Where is while?
tanushreeshankar: I need while and switch statement together
darmudasir417: while(text)
tanushreeshankar: Okay let say i want to calculate resistance for 5 resistor. My case will be series and parallel. So what should I write in the while statement() ???
darmudasir417: u don't need i think switch here u can simply calculate it by simple C programming
tanushreeshankar: Nope they are expecting expression
tanushreeshankar: And i must use while and switch together for looping
tanushreeshankar: It's in instructions
Similar questions