Need help Aligning something...just can't get it.

I can't seem to align the pricetotalstr in the simple prog I made below. If you can figure out what I need to do to align the pricetotalstr with the Amount column. It would be appreciated.

Forgot to post the prog:
//Collin
//This program
class JN9_4
          public static void main (String[] args)
               //variables
               int pots = 0;
               int largeboxes;
               int bigboxes;
               int smallboxes;
               double pricelarge;
               double pricebig;
               double pricesmall;
               double totallarge;
               double totalbig;
               double totalsmall;
               double pricetotal;
               String pricetotalstr;
               //literals
               final double Pricelarge = 7.25;
               final double Pricebig = 3.50;
               final double Pricesmall = 1.00;
               //input
               pots = IO.getInt("How many pots are going to be shipped?");
               //process
               largeboxes = pots/9;
               bigboxes = (pots%9)/4;
               smallboxes = (pots%9)%4;
               totallarge = largeboxes*Pricelarge;
               totalbig = bigboxes*Pricebig;
               totalsmall = smallboxes*Pricesmall;
               pricetotal = totallarge+totalbig+totalsmall;
               //output
               pricetotalstr = IO.format('r', 8, pricetotal, 2);
               IO.showMsg("Num \t Size \t Price \t\t Amount" +"\n"+
                         largeboxes+"\t 9 \t $"+Pricelarge+"\t\t $"+totallarge+"\n"+
                         bigboxes+"\t 4\t $"+Pricebig+"\t\t $"+totalbig+"\n"+
                         smallboxes+"\t 1\t $"+Pricesmall+"\t\t $"+totalsmall+"\n"+
                         "\t\t\t\t $"+pricetotalstr);
               //done
               System.exit(0);
}

Similar Messages

  • Need help with volume I can't get rid of and terminal

    I own a external HD named "elements". One day a second volume appeared named "elements". Every time I tried to save files to my external HD they were written on this mysterious volume. The volume isn't showed on my desktop - only when I try to save something with Opera (browser) or in the terminal I can see it.
    I renamed my external HD so I can write files to it. So far so good.
    But how can I get rid of this volume? The finder does not show it. Spotlight does noch find it. Only in the terminal I can see this volume and I can see the files in it.
    the terminal command "diskutil eject /volumes/elements" or "diskutil unmount force /volumes/elements" did not help.
    what can I do?

    It sounds like a "false clone" was created on your internal HD, which can happen if the target volume of a backup program becomes unavailable during the copy process.
    Try this:
    First eject and disconnect all external drives, then:
    Finder>Go menu> Go to Folder
    enter /Volumes and click Go
    Don't touch the alias to your internal HD volume, or any other alias.
    If you see "elements," and it is NOT an alias, trash it and empty the trash.
    jd

  • My iPhone 4s Bluetooth is not working, I have ios 5.1 but just can't get my Sony erricson hbh-pv715 headset to connect to the phone,  the phone can't find any Bluetooth device, can you help please

    My iPhone 4s Bluetooth is not working, I have ios 5.1 but just can't get my Sony erricson hbh-pv715 headset to connect to the phone,  the phone can't find any Bluetooth device, can you help please

    Yes it's in pairing mode, it worked fine with the 3GS but doesn't seem to work with the 4s,  my 4s can't find any other bluetooth device, I think the problem ls with apple?

  • Port 8080: I know this is simple, I just can't get it to work.

    I'm trying something that I'm sure is relatively simple. But I just can't get it to work. I have OSX Server 10.4.10. I currently have my company site (www.example.com) hosted on it. But I'm trying to get another site hosted on it at port 8080. When I enter my company domain, www.example.com:8080, the page can't be displayed. But when I enter the IP address, such as 192.168.xxx.xxx:8080 from within my network, the correct site shows up. How can I get a website displayed at port 8080 from outside my network? I'm running DD-WRT on my router and have ports 80 and 8080 directed to the IP address of my server.
    Thanks in advance for any help.

    Hi WiFiNetGuy-
    I am a tad confused, which isn't new, but I need to get a grasp on exactly what it is that you are trying to do.
    Do you have both websites (i.e. www.example1.com and www.example2.com) both pointed at the same ip address? How many unique domain names and ip addresses are we talking about?
    From what you describe it sounds like a routing issue but I need more info (:>)
    Luck-
    -DaddyPaycheck

  • My printer is on line i just can not get it working on my laptop

    my printer is on line i just can not get it working on my laptop

    Hi @murphyett , 
    Thank you for visiting the HP Support Forums and Welcome. I have read about your HP Printer and not working Wirelessly. Here is a link to the HP Print and Scan Doctor. The HP Print and Scan Doctor will run a check on your system.
    What is the model of printer? I would be happy to assist if needed as there are many models of HP Printers I would need the model number. How Do I Find My Model Number or Product Number?
    Please respond with which Operating System you are running:
    Which Windows Operating System am I running?
    Please let me know.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • HT1363 My old iPod Nano says to use iTunes to restore and I've followed all suggested help steps, but I can't get it into disk mode nor can I get it to show in my computer or in iTunes.

    My old iPod Nano says to use iTunes to restore and I've followed all suggested help steps, but I can't get it into disk mode nor can I get it to show in my computer or in iTunes.  I have the latest version of iTunes.  Windows has all the most recent updates too.  I can reset the iPod, but the message to Use iTunes to restore comes back and I am stuck.

    Already tried another USB port, still nothing.
    I don't have another PC to check, I only have one which is the one not working with my iPod.
    It appears under my Computer, just not under iTunes. Plus, the iPod classic troubleshooting assistant doesn't work because I can't restore since it can't come up onto my iTunes! Even my iPod says "Use iTunes to Restore" once in a while, but I plug it in & I'm not able to restore it since it won't come up under iTunes.
    Please help

  • I have been using my apple tv to access netflix for several months.  It suddenly stopped working.  When I try to go to netflix from the menu, it says "accessing netflix" but never does.  I can access you tube just fine, but just can't get to netflix.

    I have been using my apple tv to access netflix for several months.  It suddenly stopped working.  When I try to go to netflix from the menu, it says "accessing netflix" but never does.  I can access you tube just fine, but just can't get to netflix.  Any ideas.  I have unplugged everything and waited but nothing helped. 

    Update software. If that doesn't work try resetting.  Mine started working after the update.

  • I have need help with something Please respond Quickly :)

    I have need help with something Please respond Quickly  ok so i have the linksys wrt54g Version 2.2 and i upgraded the firmware to V4.21.4 from this site http://homesupport.cisco.com/en-us/wireless/lbc/WRT54G and i clicked V2.2 for the router. So after i upgraded i lost internet ability i can't use the internet so i had to downgrade back to V4.21.1 but i want the things that newer update sloves. Please Help. Everything thing says DNS error? aka Modem.
    $$Cgibbons$$

    Ya i tried that i tried restoring and redoing everything when i downgrade back to .1 it works fine though?
    $$Cgibbons$$

  • Hi, I had recently purchased ipad3 and but obviously have been having issues with heating up and some minor issues with video playback etc. Apple has agreed to replace my device. I need help in deciding whether i should get a new ipad3 or opt for ipad2.

    Hi, I had recently purchased ipad3 and but obviously have been having issues with heating up and some minor issues with video playback etc. Apple has agreed to replace my device. I need help in deciding whether i should get a new ipad3 or opt for ipad2. Seller is willing to replace it with ipad2 as well..
    Have also heard that the ipad3 revamped version is around along with the mini pad rumor..too much information - lot's of confusion pls help

    Lindsay,
    Your iBookG4 is still a pretty awesome Mac. Like already said, it has the power to run Leopard, but it depends if you have an internal DVD drive.
    Then I suppose you have to add up the cost of the OS, perhaps another 512MB RAM, iLife 08 and replacements for any favourite apps that you currently use (Leopard breaks a lot of stuff, but Intel breaks even more). Compare it to the cost of a new MacBook, which wil have all of that included and be 3-4x faster too.
    It also depends on what you want to achieve with your iBook. My PMG4 still cuts it today, I still use it in preference to my new Mac Pro, It's about the same age as your iBook, and I'll only stop using it when it becomes "painfully" slow. My 1 year old son currently uses the Mac Pro (parts for a Mac Pro are easier to replace than those for a PMG4).
    I think your choice is simple, if you can a cheap copy of Tiger, use that, it'll get your iPod Touch up and running. It came in DVD and 4 CD version (by request).
    Leopard will work for you too but a lot of the best eye-candy requires quite a meaty graphics card and you may need a RAM upgrade and replacement software - OS9 Classic is not supported in Leopard.

  • I need help finding photos just downloaded to Lightroom...they only show up in "previous downloads" and not in a folder in my pictures

    I need help finding phots just downloaded to lightroom...they only show up in "prevoious downloads" and not in a folder in my pictures.  what can I do to correct this?

    Also, please be aware that Lightroom is not a file browser like your operating system Finder or Explorer is. If the photos are not in the folder you expected them to be in, it is because you (accidentally) imported them into a different folder.

  • HT201318 i've paid for my icloud storage but now need a vat receipt, where can i get one?

    i've paid for my icloud storage but now need a vat receipt, where can i get one?

    Usually Apple sends an invoice to your mail 1-2 days after your purchase.
    You may even search the invoice yourself, but I'm not sure if you will find it before 1-2 days.
    More info here  https://discussions.apple.com/message/12360444#12360444

  • After updating to Firefox 4, I have lost 4 plugins/add ons due to their NOT being compatible. I can no longer play my bejewelled game. Please help me here. Can I get Firefx 3.6 back? Will that help me?

    Firefox 3.6 allowed me to play games, Firefox 4 upgrade doesn't.Question
    After updating to Firefox 4, I have lost 4 plugins/add ons due to their NOT being compatible. I can no longer play my bejewelled game. Please help me here. Can I get Firefx 3.6 back? Will that help me?

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/all-older.html

  • HT3737 I have an old apple desktop that needs an OS. Where can I get an OS for this that mac?

    I have an old apple desktop that needs an OS. Where can I get an OS for this that mac?

    What type on machine is it?

  • Iphoto won't start. photo won't start because I need Library Upgrader? where can I get I as don't have the original disc.

    iphoto won't start because I need Library Upgrader? where can I get I as don't have the original disc.

    Sounds like you have a damaged library7  To check launch iPhoto with the Option key held down and try to create a test library. If you can import a few photos.  If that works then your original library is damaged so make a temporary, duplicate copy of the library and try the three fixes below in order as needed:
    Fix #1
    1 - delete  the iPhoto preference file, com.apple.iPhoto.plist, that resides in your Home/Library/Preferences folder. 
    2 - delete iPhoto's cache files that are located in your Home/Library/Caches/com.apple.iPhoto folder. 
    3 - reboot, launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding the the Option key.  You'll also have to reset the iPhoto's various preferences.
    Fix #2
    Launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library.
    Select the options identified in the screenshot. 
    Fix #3
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • I tryed to download facebook app to my itouch 4g but says need iphone 3.0 how can i get it

    i tryed to download facebook app to my itouch 4g but says need iphone 3.0 how can i get it

    Which ipod generation do you have?
    For original: 
    Purchasing iOS 3.1 Software Update for iPod touch (1st generation)
    Otherwise, click check for updates.

Maybe you are looking for

  • How can you identify when a RP has a bootflash failure on CRS-1?

    Hi Everyone, I am hoping someone can assist me in identifying when a RP has a bootflash issue and requires RMA.  We have some CRS-1 running in our network with IOS XR 3.8.2 and some with 4.0.3.  All the commands that I am aware of do not identify whe

  • Where can i download adobe extension manager

    where can i download adobe extension manager

  • Video Cameras that work with Mac software...

    I am a new Mac user (3 months and still learning) and My wife is a photo freak. She is wanting to get a new camcorder and start editing some of the footage she gets. Which camcorders out there have people had success with on the Mac??? We currently h

  • 6i and 6.1 compatability

    Has anyone seen any compatability issues between 6i and 6.1? I have had a problem with the queue vis. I haven't looked into it in any great detail, this is just a general shout out to the community.

  • IPhone 3gs and Nike + iPhone

    Do I need to buy the whole starter kit for the iPhone 3gs or just the sensor?