How do I use tabs?
20 Replies - 257 Views - Last Post: 09 March 2013 - 07:15 PM
#17
Re: Allignment problem
Posted 09 March 2013 - 06:17 AM
Google how to use it and it worked. Thanks!
#18
Re: Allignment problem
Posted 09 March 2013 - 06:24 AM
The simplest answers are oft the best answers. Glad I could help.
#19
Re: Allignment problem
Posted 09 March 2013 - 01:22 PM
glr,
Just to add a bit to it all, you sacrificed the help of someone who provided you with a very precise answer above then bashed him on his ego.. no no.. I'm not going to quote it, but andrew is right when he suggests you read it again. Honestly, if this post hasn't taught you exactly 3 different yet feasible solutions to your specific issue, I would suggest the same, that you begin again from day 1. Your road ahead will only be paved with potholes unless you develop a love for problem solving and become accustomed to pounding your head on things while trying to resolve issues in your code.
Just to add a bit to it all, you sacrificed the help of someone who provided you with a very precise answer above then bashed him on his ego.. no no.. I'm not going to quote it, but andrew is right when he suggests you read it again. Honestly, if this post hasn't taught you exactly 3 different yet feasible solutions to your specific issue, I would suggest the same, that you begin again from day 1. Your road ahead will only be paved with potholes unless you develop a love for problem solving and become accustomed to pounding your head on things while trying to resolve issues in your code.
#20
Re: Allignment problem
Posted 09 March 2013 - 06:13 PM
Forget tabs... you had a good start
System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);
you have 4 things to print and m is an int so something like
System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);
System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);
you have 4 things to print and m is an int so something like
System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);
#21
Re: Allignment problem
Posted 09 March 2013 - 07:15 PM
pbl, on 09 March 2013 - 06:13 PM, said:
Forget tabs... you had a good start
System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);
you have 4 things to print and m is an int so something like
System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);
System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);
you have 4 things to print and m is an int so something like
System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);
Thanks! I didn't ask to to be spoon fed. I did tried but couldn't get it to work. Now I know. Thanks again! Unlike some people here they just have too big of an ego to correct beginners.
This post has been edited by glr: 09 March 2013 - 07:24 PM
|
|

New Topic/Question
Reply




MultiQuote



|