I have an exercise : Accept operator(+, / , * , -)
Example :
I type 5 + 3 this result is = 8.
I have a problem when I print result :
5 + 3
= 8
"= 8" is not same line with 5 + 3.
Can you help me with this problem? Thanks for reading.
gaupoit 0 Newbie Poster
Recommended Answers
Jump to PostIf your print out reads:
5+3
=8
Then you must not be printing everything in the same statement.If this was your intention, then using System.out.print instead of System.out.println on your first print will allow your second print to be on the same line.
If it wasn't your …
All 4 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.