Ask Question
1 March, 03:32

What is the output of the following statement?

System. out. println ("1 + 2/n"

+ "3 - 4/n" + "=/n" + (1 + 2)

+ "/n" + (3 + 4));

+3
Answers (1)
  1. 1 March, 07:14
    0
    1 + 2

    3 - 4

    =

    3

    7

    Explanation:

    1 + 2 (it print the string "1+2" and goes to a new line

    3 - 4 (it print the string "3-4" and goes to a new line)

    = (it print the string "=" and goes to a new line)

    3 (it perform arithmetic operation on 1+2 to give 3)

    (It create empty new line)

    7. (it perform arithmetic operation on 3+4 to give 7)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is the output of the following statement? System. out. println ("1 + 2/n" + "3 - 4/n" + "=/n" + (1 + 2) + "/n" + (3 + 4)); ...” 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