Ask Question
14 December, 19:23

Retype the statements, correcting the syntax errors. system. out. println ("num: " + songnum); system. out. println (int songnum); system. out. println (songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.

+1
Answers (1)
  1. 14 December, 19:37
    0
    System. out. println ("num: " + songnum);

    This will print

    num:5

    OR

    num:9

    2. System. out. println (int songnum);

    Remove the "int" and recompile. Rewrite it as System. out. println (songnum);

    Then it will print

    5

    OR

    9

    3. System. out. println (songnum " songs");

    Rewrite it as System. out. println (songnum + " songs");

    Then it will print

    5songs

    OR

    9songs

    For all this make sure songnum is declare and initialised as int songnum=5;

    or int songnum=9;
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Retype the statements, correcting the syntax errors. system. out. println ("num: " + songnum); system. out. println (int songnum); system. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers