Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Padding decimals in Java

Name: Anonymous 2013-02-03 4:44

How can I pad a double with both trailing zeros (two places, for money) and leading spaces before the $ to align the decimal places?
I want my list to look like:

$###.##
$###.##
_$##.##
__$#.##
__$0.##
__$0.00

As the value decreases. The underscores should be spaces, of course. I wasn't sure if they would appear or be deleted in the post.

Also, I changed a function somewhere and a series of print functions decided to start tabbing every fucking word so they're all spread out and I can't find anything wrong with the code. Any ideas?

System.out.print("\n\nWhat    would    you like    to    do?\n1. Calculate    the Monthly    Payment for    a fixed rate, fixed term loan.\n");
            System.out.print("2.    Calculate the number    of    Months to pay off    a loan with    a fixed monthly payment.\n");
            System.out.print("\nPlease    enter    the number of your selection:    ");

Name: Anonymous 2013-02-03 22:19

                                                                                                                                      
88                                                        88                                                  88                      
88                                                        88                                           ,d     88                      
88                                                        88                                           88     88                      
88,dPPYba,    ,adPPYba,   8b      db      d8      ,adPPYb,88   ,adPPYba,    ,adPPYba,  ,adPPYba,     MM88MMM  88,dPPYba,    ,adPPYba, 
88P'    "8a  a8"     "8a  `8b    d88b    d8'     a8"    `Y88  a8"     "8a  a8P_____88  I8[    ""       88     88P'    "8a  a8P_____88 
88       88  8b       d8   `8b  d8'`8b  d8'      8b       88  8b       d8  8PP"""""""   `"Y8ba,        88     88       88  8PP""""""" 
88       88  "8a,   ,a8"    `8bd8'  `8bd8'       "8a,   ,d88  "8a,   ,a8"  "8b,   ,aa  aa    ]8I       88,    88       88  "8b,   ,aa 
88       88   `"YbbdP"'       YP      YP          `"8bbdP"Y8   `"YbbdP"'    `"Ybbd8"'  `"YbbdP"'       "Y888  88       88   `"Ybbd8"' 
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
   88                                        ad88  88                  88           88                                                
   ""                                       d8"    ""                  88           ""                                                
                                            88                         88                                                             
   88   ,adPPYba,  8b      db      d8     MM88MMM  88  8b,     ,d8     88,dPPYba,   88  ,adPPYba,                                     
   88  a8P_____88  `8b    d88b    d8'       88     88   `Y8, ,8P'      88P'    "8a  88  I8[    ""                                     
   88  8PP"""""""   `8b  d8'`8b  d8'        88     88     )888(        88       88  88   `"Y8ba,                                      
   88  "8b,   ,aa    `8bd8'  `8bd8'         88     88   ,d8" "8b,      88       88  88  aa    ]8I                                     
   88   `"Ybbd8"'      YP      YP           88     88  8P'     `Y8     88       88  88  `"YbbdP"'                                     
  ,88                                                                                                                                 
888P"                                                                                                                                 
                                                                                                                                      
                           ad88     ad88                      ad88888ba                                                               
                          d8"      d8"                       d8"     "8b                                                              
                          88       88                        ""      a8P                                                              
 ,adPPYba,   ,adPPYba,  MM88MMM  MM88MMM  ,adPPYba,   ,adPPYba,   ,a8P"                                                               
a8"     ""  a8"     "8a   88       88    a8P_____88  a8P_____88  d8"                                                                  
8b          8b       d8   88       88    8PP"""""""  8PP"""""""  ""                                                                   
"8a,   ,aa  "8a,   ,a8"   88       88    "8b,   ,aa  "8b,   ,aa  aa                                                                   
 `"Ybbd8"'   `"YbbdP"'    88       88     `"Ybbd8"'   `"Ybbd8"'  88                                                                   
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
88                       88                                                                     88                                    
88                       88                                                                     ""    ,d                              
88                       88                                                                           88                              
88,dPPYba,    ,adPPYba,  88,dPPYba,   8b,dPPYba,   ,adPPYba,  8b      db      d8  ,adPPYba,     88  MM88MMM                           
88P'    "8a  a8P_____88  88P'    "8a  88P'   "Y8  a8P_____88  `8b    d88b    d8'  I8[    ""     88    88                              
88       88  8PP"""""""  88       d8  88          8PP"""""""   `8b  d8'`8b  d8'    `"Y8ba,      88    88                              
88       88  "8b,   ,aa  88b,   ,a8"  88          "8b,   ,aa    `8bd8'  `8bd8'    aa    ]8I     88    88,    888                      
88       88   `"Ybbd8"'  8Y"Ybbd8"'   88           `"Ybbd8"'      YP      YP      `"YbbdP"'     88    "Y888  888 

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List