single line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mr rocker
    New Member
    • Nov 2011
    • 1

    single line

    HI all..

    Can we write a single line statement inside main function to get two numbers from user, compute addition of those two numbers and finally display the result????
  • algorithm92
    New Member
    • Nov 2011
    • 4

    #2
    You can write an entire program in a single line of code, the semi-colons in c++ act as periods. So you could, however, it will be very messy and extremely difficult to debug. It's a lot easier to read if it's separated by lines.

    Comment

    • whodgson
      Contributor
      • Jan 2007
      • 542

      #3
      Show us what you have come up with...maybe someone can improve on it.

      Comment

      Working...