Question: Write a while loop in either Cor C++ or Java programming language. The loop should have at least 10 lines of code inside the loop
Write a while loop in either Cor C++ or Java programming language. The loop should have at least 10 lines of code inside the loop block(that is between the PS: cout statements and any unary operator expressions are excluded from the count of 10 lines, Expand the context-free grammar below, so it produces the code you wrote. Context Free Grammar 1. Iteration statement while expression) statement 2. statement. In turn, is often a list enclosed in braces: 3. statement compound-statement 4. compound-statement block-item-list opt) 5. where 6.block-item-list opt-block-item-listor 7.block-item-list optand B. block-item-list-block Item 9.block.item-list-blockItem list block-tem 10.block-Item declaration 11.block-item-expression 12 block item statement 13.block-Item ->printstatement 14. expression--variable condoperator variable 15. expression-variable condoperator value 16. expression variable unaryoperator 17 variable-any single alphabet any number 18. condoperator-11 > 19 printstatement-coutcout +1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
