I want  to know making a program in  ascending order....

hi to all...happy holidays
i have a code of mine but it doesn't work, pls help me...
class Sorting{     
          void sort(int[]a){
          int i,j;
          int temp;
          for (i=0;i<a.length-1;i++)
               for (j=i+1;j<a.length;j++)
                    if (a[j]<a)
                         temp=a[j];
                         a[j]=a[i];
                         a[i]=temp;
that code is for 500 numbers i try to be in ascending order but i doesnt work...
i want it also that when I type the number it says that these are the numbers i type....Can someone help with a sample code even just up to 11 numbers it accept and displays the number i type first before the output in ascending order....
Thanks a lot for consideration and help....

How about:public class Hello {
     public static void main(String[] args) {
          Hello hi = new Hello();
          int[] b = {5,3,7,2,1};
          hi.sort(b);
          for (int k=0; k < b.length; k++)
               System.out.println(b[k]);
     void sort(int[] a){
          int temp;          
          for (int i=0; i < a.length-1; i++) {
               for (int j=i+1; j < a.length; j++) {
                    if (a[j] < a) {
                         temp=a[j];
                         a[j]=a[i];
                         a[i]=temp;

Similar Messages

  • I have 4 ipods 4th gen and want to know if one program to purchase through apple to share the music I've purchased on all of them. Is it the icloud AND itunes match?

    I have 4 ipods all 4th gen and want to know if one program is available to purchase through apple to have all music I've purchased can be used on all of them. Is it a combo of both itunes match and icloud?

    You don't need iTunes Match to have your music in all your devices. iTunes Match is for getting music that you've purchased elsewhere into the cloud. All you need to do is set up each of your devices to your iTunes Store account. You can then download things you've purchased by going to the Purchased section. See:
    http://support.apple.com/kb/ht2519
    Regards.

  • I have three email accounts and want to know how to change the display order.

    I have three email accounts and want to know how to change the display order.

    Install this add on.
    https://addons.mozilla.org/en-US/thunderbird/addon/manually-sort-folders/?src=search

  • Want to know the release and blocked sales order status

    hii..
    I want to create a report that contains who blocked and who released the sales order and when he released..in which table i can get the details..please tell me where this details has been updated...

    hi,
    go to the SPRO settings and view the release procedure in MM and SD part in Purchasing...
    you customized that part then only you can release such documents....
    thanks,
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • I just uninstall a program by puting it to the trash, how can i know if the program left some folder or file?

    I wanted to uninstall a program so I put it to the trash but I want to know if the program left some file or folder somewhere so I can completely eliminate.
    Thanks.

    Any program that simply requires you to drag it to the applications folder to install, can be uninstalled by simply deleting it. If an application goes through an "install process", it more than likely needs an uninstaller to be uninstalled completely.

  • Can't load Facebook on Firefox . Suspect malware/trojan. Downloaded 3 free scan/remove programs, all end in .exe and my Mac wants to know which "Application" to use to run them. Help?!

    Firefox 3.6.19
    Mac OS 10.4.11
    attempted the''' 3 free options''' listed here
    http://support.mozilla.com/en-US/kb/Firefox%20never%20finishes%20loading%20certain%20websites?s=cannot+load+page&as=s
    when I click on any of them, they don't just open/run. they want to know what application to use to open them. do these work for my Mac, or is there another free alternative?
    Here's what the Mozilla page above said
    Firefox never finishes loading certain websites
    If specific websites (not all) start to load, but never finish (i.e. The Firefox activity indicator may spin for several minutes, or the status bar may show "Done" on a blank page), it is either because of a software trojan called Vundo, or a file being in the wrong format.
    Table of Contents
    * Vundo trojan variant
    o Search for malware
    o More help
    * JavaScript file format
    Vundo trojan variant
    A variant of the Vundo trojan is known to cause Firefox to have problems loading certain high-traffic sites, including Google, Yahoo, MySpace, Facebook, and more.
    Search for malware
    Not all variants of the Vundo trojan can be detected or removed by malware scanners. However, you should scan your computer for infections first:
    * Run the Microsoft Malicious Software Removal Tool.
    * Run a full system virus scan with something other than your normal program:
    o A '''free solution online is Kaspersky's online scanner'''.
    * Run a full system spyware scan with something other than your normal program:
    o MalwareBytes' Anti-Malware
    o '''SUPERAntiSpyware''' is known to detect many variants of Vundo, and has a free version.
    o '''Spybot S&D''' is a well-known free solution.
    More help
    If you're having a problem loading sites other than the one described above, see the Error loading websites article to see if it addresses your problem. You can also check your Internet security software - resetting permissions for Firefox can often fix similar problems.
    There can be other causes of the symptoms described above. Before attempting these instructions, try the methods described in the Basic Troubleshooting article to see if they will address your problem.
    If you still have problems after scanning, you may ask a support question.

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • I just installed XQuartz to run a program and I want to know what it is for

    I am aware that X11 XQuartz is necessary for a program to run so I installed it but then it asked me to log out and then log back in. It also said it was a windows server. Does that mean XQuartz replaced the default windows server in OSX Mavericks? Is there any risk to this? I don't want to run this program that much and I don't want to risk any other programs not working correctly because of a different library. I would uninstall it if there is a risk.
    BTW I obviously don't know much about what this is or what it does.

    I did know what it was for. When I attempted to open the software, Inkscape in this case, OSX displayed a prompt that said the software I was trying to run needed it a newer version of X11 called XQuartz. I then verified this information online before installing it.
    BUT once I installed XQuartz it popped up this dialog saying, "You will need to log out and log back in to make XQuartz your default X11 server."
    Which is why I posted here.

  • How do I know games and programs that become free? I want to know the programs and games that become free first first

    How do I know games and programs that become free?
    I want to know the programs and games that become free first first

    You are allowed to have two activated installations so there should not be a problem having working installations on the two machines.  If by chance you have somehow tied up two activations for the one machine you can have Adobe support help resolve that thru chat.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • Want to know the screens associated with a module pool program ??

    Hi,
    I have an M type program (module pool), say SAPMF05M. I want to
    1) see which transaction code initiated it ??
    2) see the screens associated with it ??
    how do i achieve this ?? I know just the program name !!
    thanks

    Go to SE80, make sure "program" is in the object list box, enter the program name in the field underneath the object listbox and hit enter.  You will see a bunch of folders in  the tree structre.  There will be one for screens and one for transactions.
    Please remember to award points for helpful answers.  Thanks.
    Regards,
    Rich HEilman

  • I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    OK....I'm stumped.  The message you are seeing is typically there to protect someone from syncing with a different computer/iTunes account.  Is there any way anyone else has used your iPad and possibly connected it to their computer?

  • I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of

    I wanted to know explain my problem down package cc2014 where I put the serial number of the problem that I have is that when you open the program asks me start of session in which he put it and go but back inside and it drives me to request the start of session and I take 3 weeks or more with this problem if they can support me solve it was the number of seire wearing this being installed at a private university

    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page

  • I am new to this program and want to know how to blur the edges of a pic

    i am new to the program and want to know how to blur the edges of a pic?

    Another way...
    Use the Rectangular Marquee tool to draw out the edge to be blurred. Feather the selection. Here I feathered 50 px (note that feathering makes the borders of the selection appear rounded).
    Invert the selection so that the edge is now selected, and apply a Gaussian Blur:
    The reason for feathering is to soften the edge of the blur. The amount of feathering and amount of the Gaussian Blur is simply trial-and-error.

  • Umair: I want to know about the new Apple Trade in program?If any apple employee on the forum,get in contact with me.

    Umair: I want to know about the new Apple Trade in program?If any apple employee on the forum,get in contact with me.

    iUmair wrote:
    I want to know how Apple measure the value of old iPhone?
    Then contact Apple and ask them.  Nobody here woul know.
    How can people from outside US can participate.
    They can't at this time.

  • Well,Most of the time I use Firefox,but that is without making it my default browser,I want to know the benefits of making Firefox my default browser,Please do let me know.

    I want to know the benefits of making Firefox as my default browser.If I do not make IT my default browser then what will be my loss ? Most of the time I use Firefox.Please help me intime.Thank You. I am using Windows Vista,Firefox 10.0.2.

    Making Firefox the default simply tells Windows that you want to use Firefox to open anything on the internet. You are still able to access other browsers, it just uses Firefox to open stuff like links in emails, docs, etc. instead of Internet Explorer.
    It is really a personal choice, if you want to use Firefox the majority of the time, I'd set it as default, it just makes thinks easier.

  • I am using a Mac Leopard and want to know if I upgrade to Snow Leopard (so I can use the new Lightroom 4) will any of my programs be affected.  I will not be able to restore some software and want to know if I'll lose those programs with the upgrade?

    I am using a Mac Leopard and want to know if I upgrade to Snow Leopard (so I can use the new Lightroom 4) will any of my programs be affected.  I will not be able to restore some software and want to know if I'll lose those programs with the upgrade?

    Hello,
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they do still have it:
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    And it's been reported that if you have a MobileMe account Apple will send one free.
    If it's a core Duo & not a Core2Duo, then it'll only run in 32 bit mode.

Maybe you are looking for