Ask Question
27 June, 13:54

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

+4
Answers (1)
  1. 27 June, 14:55
    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?
Get an answer to your question ✅ “What output is produced by the following code fragment int num = 1 max = 20 while num < max? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers