CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Apr 2009
    Posts
    7

    Displaying/Formatting Output

    Ok so besides the normal system.out.println() what other ways are there to display out specifically in a different layout or format. I have been told that the printf() method would be best for what I want but I figured I would check here. Let me explain a little more of what I am trying to do.

    I am trying to display variable values with different titles similar to a basic chart I guess I would say. Something like this:



    Deposit <---------------> Withdrawal <-------------> Balance
    ---------- <---------------> -------------- <-------------> ----------
    <---------------------------------------------------------->510.25
    <---------------------------> -500.10 <---------------> 10.15
    80.00<-------------------------------------------------->90.15
    <---------------------------->-70.15 <----------------> 20.00
    <---------------------------->-30.00<-----------------> -10.00
    100<----------------------------------------------------->90.00
    -------------------------------------------------------------
    Surcharge = 10.00 Balance = 80.00
    Interest = 0.40 Balance = 80.40



    Now I could get it to print out all sorts of ways just using println like normal but there must be an easier way.

    Also I would have a different variable for each field and would want to display it as the program is reading the input and then displaying the bottom part when it ends.

    Any suggestions?

    Thanks in advance and sorry if I left something out im still new
    Last edited by tbk0de; April 12th, 2009 at 04:58 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured