Ask Question
9 September, 01:51

What output is produced by the following code fragment int num = 1 max = 20 while num < max?

+3
Answers (1)
  1. 9 September, 05:28
    0
    Firstly, you'd generate a compile error.

    I don't know what language you're using, but you need to have a comma before declaring max, to tell the compiler you're creating another variable of type int. Additionally, you didn't end that line with a semi-colon (again, I don't know what language you're using, so this semi-colons could be irrelevant, such as in Python). Finally, a condition in a while loop is usually encapsulated by parentheses, like this "while (num < max) ", and braces are introduced if you're creating a while loop greater than 1 statement.

    But to answer your question. No output.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What output is produced by the following code fragment int num = 1 max = 20 while num < max? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers