• Post Reply Bookmark Topic Watch Topic
  • New Topic

Output formatting  RSS feed

 
Linda Selfridge
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Further to my previous post, I now need to format the output of the program to look like the following:

Worker's projected yearly gross salary : XXXXXX.XX

Superannuation contribution
Employer contribution : XXXXXX.XX
Employee contribution : XXXXX.XX

Worker's weekly assessable income : XXXXXX.XX
Weekly income tax : XXXXXX.XX
Medicare levy : XX.XX
Child Support contribution : XXX.XX
: ========
Take home pay : XXX.XX

Now the actual outputs are fine but I need to get the extra lines in place and the :======= as shown in the 2nd last line. I am not too sure how to go about this, can anyone point me in the right direction.

My output current appears like this:



Although in realty the figues are actually in line.

Thanks in advance!
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what are you using to output these lines?
 
Linda Selfridge
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, the following is the code...



Thanks
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it appears that you're asking to output a blank line and a line with dashes or equals signs in it. I don't know why you can't just use System.out.println("") and System.out.println("=============>") or whatever.

rc
 
Linda Selfridge
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ralph, I had though about doing that but wasn't too sure if there was a particular way of doing these types of things. (I am only in my 3rd week of doing these types of programs).

I will give it a go.

Thank you for your help
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!