Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

write a calculator program with c using switch

OpenStudy (espex):

If you are interested in help, you should post your design parameters and any code you have developed towards completing this. It would be helpful if you were to also outline where you were having difficulties.

OpenStudy (anonymous):

Please solve for me task number 3 & Task number 4 !

OpenStudy (espex):

Number 3 will require you to create a nested 'for' loop. You simply place the print statement inside the inner loop and use the outer to increment.

OpenStudy (anonymous):

give a clue

OpenStudy (espex):

How would you write a for loop that incremented 7 times?

OpenStudy (espex):

Are you familiar with a for loop construction?

OpenStudy (anonymous):

yes.. like I solved task number 2 yesterday but it was while loop statement /but i can't understand the number 3 question .

OpenStudy (espex):

Question 3 is asking you to nest loops, meaning put one inside another. for( ; ; ){ for( ; ; ){ } }

OpenStudy (anonymous):

oh yes.. it will contain 2 or more loop.. right ?

OpenStudy (espex):

Yes, although in this case it should only require two. The point is to get you thinking about how the iteration will need to work and how they effect the timing in each loop.

OpenStudy (anonymous):

for(i=1; i<=10; i++) for(j=1; j<=i; ++j)

OpenStudy (espex):

Yes, however you will use the user input as the outer condition and the current state of that counter as your inner condition.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!